2014-03-24 08:32:00 +04:00
|
|
|
{ stdenv, fetchurl }:
|
2009-02-23 01:06:20 +03:00
|
|
|
|
2014-03-24 08:32:00 +04:00
|
|
|
assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux");
|
|
|
|
let
|
|
|
|
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
|
2014-04-29 00:27:40 +04:00
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath
|
2015-01-15 07:25:26 +03:00
|
|
|
[ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc}/lib64";
|
2014-04-29 00:27:40 +04:00
|
|
|
patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
|
2014-03-24 08:32:00 +04:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "fmod-${version}";
|
2014-08-20 10:41:47 +04:00
|
|
|
version = "4.44.41";
|
2009-02-23 01:06:20 +03:00
|
|
|
|
2014-03-24 08:32:00 +04:00
|
|
|
src = fetchurl {
|
2014-08-20 10:41:47 +04:00
|
|
|
url = "http://www.fmod.org/download/fmodex/api/Linux/fmodapi44441linux.tar.gz";
|
|
|
|
sha256 = "0qjvbhx9g6ijv542n6w3ryv20f74p1qx6bbllda9hl14683z8r8p";
|
2014-03-24 08:32:00 +04:00
|
|
|
};
|
|
|
|
|
2014-04-29 00:27:40 +04:00
|
|
|
dontStrip = true;
|
2014-03-24 08:32:00 +04: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-29 00:27:40 +04:00
|
|
|
|
|
|
|
${patchLib "$out/lib/libfmodex.so"}
|
|
|
|
${patchLib "$out/lib/libfmodexL.so"}
|
2009-02-23 01:06:20 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Programming library and toolkit for the creation and playback of interactive audio";
|
2014-03-24 08:32:00 +04:00
|
|
|
homepage = "http://www.fmod.org/";
|
|
|
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
2009-02-23 01:06:20 +03:00
|
|
|
};
|
|
|
|
}
|