at v192 40 lines 1.3 kB view raw
1{ stdenv, fetchurl }: 2 3assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux"); 4let 5 bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64"; 6 7 libPath = stdenv.lib.makeLibraryPath 8 [ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc}/lib64"; 9 patchLib = x: "patchelf --set-rpath ${libPath} ${x}"; 10in 11stdenv.mkDerivation rec { 12 name = "fmod-${version}"; 13 version = "4.44.41"; 14 15 src = fetchurl { 16 url = "http://www.fmod.org/download/fmodex/api/Linux/fmodapi44441linux.tar.gz"; 17 sha256 = "0qjvbhx9g6ijv542n6w3ryv20f74p1qx6bbllda9hl14683z8r8p"; 18 }; 19 20 dontStrip = true; 21 buildPhase = "true"; 22 installPhase = '' 23 mkdir -p $out/lib $out/include/fmodex 24 25 cd api/inc && cp * $out/include/fmodex && cd ../lib 26 cp libfmodex${bits}-${version}.so $out/lib/libfmodex.so 27 cp libfmodexL${bits}-${version}.so $out/lib/libfmodexL.so 28 29 ${patchLib "$out/lib/libfmodex.so"} 30 ${patchLib "$out/lib/libfmodexL.so"} 31 ''; 32 33 meta = { 34 description = "Programming library and toolkit for the creation and playback of interactive audio"; 35 homepage = "http://www.fmod.org/"; 36 license = stdenv.lib.licenses.unfreeRedistributable; 37 platforms = stdenv.lib.platforms.linux; 38 maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; 39 }; 40}