diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2017-01-04 13:23:02 -0600 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2017-01-17 19:49:18 -0600 |
commit | 6c6db7b58b79436a32022e4dcdda4a07051841f4 (patch) | |
tree | 3a29c34837bdeb98d23abf77b6375455f2172945 /pkgs/development/libraries/portaudio/default.nix | |
parent | 5c09b223f9aca13a793935142f29cf98151ee360 (diff) |
portaudio: fix on Darwin
Diffstat (limited to 'pkgs/development/libraries/portaudio/default.nix')
-rw-r--r-- | pkgs/development/libraries/portaudio/default.nix | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index 5d8c2430ab9f9..b2375fb758376 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, alsaLib, pkgconfig }: +{ stdenv, fetchurl, alsaLib, pkgconfig +, AudioUnit, AudioToolbox, CoreAudio, CoreServices, Carbon }: stdenv.mkDerivation rec { name = "portaudio-19-20140130"; @@ -11,8 +12,9 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig ] ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib; - configureFlags = stdenv.lib.optionals stdenv.isDarwin - [ "--build=x86_64" "--without-oss" "--enable-static" "--enable-shared" ]; + configureFlags = [ "--disable-mac-universal" ]; + + propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ]; preBuild = stdenv.lib.optionalString stdenv.isDarwin '' sed -i '50 i\ @@ -27,15 +29,13 @@ stdenv.mkDerivation rec { ''; # not sure why, but all the headers seem to be installed by the make install - installPhase = if stdenv.isDarwin then '' - mkdir -p "$out" - cp -r include "$out" - cp -r lib "$out" - '' else '' + installPhase = '' make install - + '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' # fixup .pc file to find alsa library sed -i "s|-lasound|-L${alsaLib.out}/lib -lasound|" "$out/lib/pkgconfig/"*.pc + '' + stdenv.lib.optionalString stdenv.isDarwin '' + cp include/pa_mac_core.h $out/include/pa_mac_core.h ''; meta = with stdenv.lib; { |