2015-06-27 08:17:52 +01:00
|
|
|
{ stdenv, fetchurl, alsaLib, glib, libjack2, libsndfile, pkgconfig
|
2016-03-04 20:09:24 +00:00
|
|
|
, libpulseaudio, CoreServices, CoreAudio, AudioUnit }:
|
2012-03-31 21:22:19 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "fluidsynth-${version}";
|
2013-12-04 04:46:32 +00:00
|
|
|
version = "1.1.6";
|
2012-03-31 21:22:19 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/fluidsynth/${name}.tar.bz2";
|
2013-12-04 04:46:32 +00:00
|
|
|
sha256 = "00gn93bx4cz9bfwf3a8xyj2by7w23nca4zxf09ll53kzpzglg2yj";
|
2012-03-31 21:22:19 +01:00
|
|
|
};
|
|
|
|
|
2013-07-04 05:51:32 +01:00
|
|
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
sed -i '40 i\
|
|
|
|
#include <CoreAudio/AudioHardware.h>\
|
|
|
|
#include <CoreAudio/AudioHardwareDeprecated.h>' \
|
|
|
|
src/drivers/fluid_coreaudio.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
|
2016-03-04 20:09:24 +00:00
|
|
|
"-framework CoreAudio -framework CoreServices";
|
2013-07-04 05:51:32 +01:00
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ glib libsndfile ]
|
2016-03-04 20:09:24 +00:00
|
|
|
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib libpulseaudio libjack2 ]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices CoreAudio AudioUnit ];
|
2012-03-31 21:22:19 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2013-07-04 05:51:32 +01:00
|
|
|
description = "Real-time software synthesizer based on the SoundFont 2 specifications";
|
|
|
|
homepage = http://www.fluidsynth.org;
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
maintainers = with maintainers; [ goibhniu lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2012-03-31 21:22:19 +01:00
|
|
|
};
|
|
|
|
}
|