2015-06-12 12:29:12 +01:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
|
|
|
assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux");
|
|
|
|
let
|
|
|
|
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
|
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath
|
2016-04-30 21:56:43 +01:00
|
|
|
[ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc.lib}/lib64";
|
2015-06-12 12:29:12 +01:00
|
|
|
patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
|
|
|
|
|
|
|
|
src =
|
|
|
|
(if (bits == "64") then
|
|
|
|
fetchurl {
|
2015-12-12 17:29:18 +00:00
|
|
|
url = "http://zandronum.com/essentials/fmod/fmodapi42416linux64.tar.gz";
|
2015-06-12 12:29:12 +01:00
|
|
|
sha256 = "0hkwlzchzzgd7fanqznbv5bs53z2qy8iiv9l2y77l4sg1jwmlm6y";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchurl {
|
2015-12-12 17:29:18 +00:00
|
|
|
url = "http://zandronum.com/essentials/fmod/fmodapi42416linux.tar.gz";
|
2015-06-12 12:29:12 +01:00
|
|
|
sha256 = "13diw3ax2slkr99mwyjyc62b8awc30k0z08cvkpk2p3i1j6f85m5";
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit src;
|
|
|
|
|
|
|
|
name = "fmod-${version}";
|
|
|
|
version = "4.24.16";
|
|
|
|
|
|
|
|
dontStrip = true;
|
2015-12-12 17:29:18 +00:00
|
|
|
dontPatchELF = true;
|
2016-05-04 11:08:35 +01:00
|
|
|
dontBuild = true;
|
2015-12-12 17:29:18 +00:00
|
|
|
|
|
|
|
makeFlags = [ "DESTLIBDIR=$(out)/lib" "DESTHDRDIR=$(out)/include" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
'';
|
2015-06-12 12:29:12 +01:00
|
|
|
|
2015-12-12 17:29:18 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/lib/libfmodex${bits}-${version}.so $out/lib/libfmodex.so
|
|
|
|
mv $out/lib/libfmodexp${bits}-${version}.so $out/lib/libfmodexp.so
|
2015-06-12 12:29:12 +01:00
|
|
|
'';
|
|
|
|
|
2015-12-12 17:29:18 +00:00
|
|
|
meta = with stdenv.lib; {
|
2015-06-12 12:29:12 +01:00
|
|
|
description = "Programming library and toolkit for the creation and playback of interactive audio";
|
|
|
|
homepage = "http://www.fmod.org/";
|
2015-12-12 17:29:18 +00:00
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
platforms = platforms.linux;
|
2015-06-12 12:29:12 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.lassulus ];
|
|
|
|
};
|
|
|
|
}
|