2018-03-05 14:32:10 +00:00
|
|
|
{ stdenv, lib, fetchurl, alsaLib, libpulseaudio }:
|
2016-12-17 12:31:45 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
|
2018-03-05 14:32:10 +00:00
|
|
|
libPath = lib.makeLibraryPath [ stdenv.cc.cc alsaLib libpulseaudio ];
|
2016-12-17 12:31:45 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2018-03-05 14:32:10 +00:00
|
|
|
name = "fmod-${version}";
|
|
|
|
version = "4.44.64";
|
2016-12-17 12:31:45 +00:00
|
|
|
|
2018-03-05 14:32:10 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://zdoom.org/files/fmod/fmodapi44464linux.tar.gz";
|
|
|
|
sha256 = "047hk92xapwwqj281f4zwl0ih821rrliya70gfj82sdfjh9lz8i1";
|
|
|
|
};
|
2016-12-17 12:31:45 +00:00
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
2018-03-05 14:32:10 +00:00
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 api/lib/libfmodex${bits}-${version}.so $out/lib/libfmodex-${version}.so
|
|
|
|
ln -s libfmodex-${version}.so $out/lib/libfmodex.so
|
|
|
|
patchelf --set-rpath ${libPath} $out/lib/libfmodex.so
|
|
|
|
cp -r api/inc $out/include
|
2016-12-17 12:31:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Programming library and toolkit for the creation and playback of interactive audio";
|
2018-03-05 14:32:10 +00:00
|
|
|
homepage = http://www.fmod.org/;
|
2016-12-17 12:31:45 +00:00
|
|
|
license = licenses.unfreeRedistributable;
|
2018-03-05 14:32:10 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
maintainers = [ maintainers.lassulus ];
|
2016-12-17 12:31:45 +00:00
|
|
|
};
|
|
|
|
}
|