From 6c6db7b58b79436a32022e4dcdda4a07051841f4 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 4 Jan 2017 13:23:02 -0600 Subject: portaudio: fix on Darwin --- pkgs/development/libraries/portaudio/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'pkgs/development/libraries/portaudio/default.nix') 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; { -- cgit 1.4.1