2014-03-24 04:32:00 +00:00
|
|
|
{ stdenv, fetchurl }:
|
2009-02-22 22:06:20 +00:00
|
|
|
|
2014-03-24 04:32:00 +00:00
|
|
|
assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux");
|
|
|
|
let
|
|
|
|
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
|
2014-04-28 21:27:40 +01:00
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath
|
|
|
|
[ stdenv.gcc.libc stdenv.gcc.gcc ] + ":${stdenv.gcc.gcc}/lib64";
|
|
|
|
patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
|
2014-03-24 04:32:00 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "fmod-${version}";
|
2014-05-18 21:33:03 +01:00
|
|
|
version = "4.44.34";
|
2009-02-22 22:06:20 +00:00
|
|
|
|
2014-03-24 04:32:00 +00:00
|
|
|
src = fetchurl {
|
2014-05-18 21:33:03 +01:00
|
|
|
url = "http://www.fmod.org/download/fmodex/api/Linux/fmodapi44434linux.tar.gz";
|
|
|
|
sha256 = "057dvawckw3laavfkzvakyrw5lnvvfabs8myibjc95ap1awacb8x";
|
2014-03-24 04:32:00 +00:00
|
|
|
};
|
|
|
|
|
2014-04-28 21:27:40 +01:00
|
|
|
dontStrip = true;
|
2014-03-24 04:32:00 +00:00
|
|
|
buildPhase = "true";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib $out/include/fmodex
|
|
|
|
|
|
|
|
cd api/inc && cp * $out/include/fmodex && cd ../lib
|
|
|
|
cp libfmodex${bits}-${version}.so $out/lib/libfmodex.so
|
|
|
|
cp libfmodexL${bits}-${version}.so $out/lib/libfmodexL.so
|
2014-04-28 21:27:40 +01:00
|
|
|
|
|
|
|
${patchLib "$out/lib/libfmodex.so"}
|
|
|
|
${patchLib "$out/lib/libfmodexL.so"}
|
2009-02-22 22:06:20 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Programming library and toolkit for the creation and playback of interactive audio";
|
2014-03-24 04:32:00 +00:00
|
|
|
homepage = "http://www.fmod.org/";
|
|
|
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
2009-02-22 22:06:20 +00:00
|
|
|
};
|
|
|
|
}
|