From 8ac7701c4cc0538108430b7f9a7b3bdd787df29d Mon Sep 17 00:00:00 2001 From: "Jason \\\"Don\\\" O'Conal" Date: Thu, 4 Jul 2013 14:51:32 +1000 Subject: [PATCH] fluidsynth: fix build on darwin * disable pulseaudio * disable alaLib * disable jackaudio * add CoreAudio headers * link to CoreAudio framework --- .../applications/audio/fluidsynth/default.nix | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix index 70a405b3fd6..413e7d0661b 100644 --- a/pkgs/applications/audio/fluidsynth/default.nix +++ b/pkgs/applications/audio/fluidsynth/default.nix @@ -10,12 +10,25 @@ stdenv.mkDerivation rec { sha256 = "1x73a5rsyvfmh1j0484kzgnk251q61g1g2jdja673l8fizi0xd24"; }; - buildInputs = [ alsaLib glib jackaudio libsndfile pkgconfig pulseaudio ]; + preBuild = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i '40 i\ + #include \ + #include \ + #include ' \ + src/drivers/fluid_coreaudio.c + ''; + + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin + "-framework CoreAudio"; + + buildInputs = [ glib libsndfile pkgconfig ] + ++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib pulseaudio jackaudio ]; meta = with stdenv.lib; { - description = "real-time software synthesizer based on the SoundFont 2 specifications"; - homepage = http://www.fluidsynth.org; - license = licenses.lgpl2; - maintainers = [ maintainers.goibhniu ]; + 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; }; }