From e5cb0069141235c32c740b688355fbd640b84e80 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 5 Jun 2022 19:05:29 +0800 Subject: [PATCH 1/2] portaudio: fix cross compilation --- pkgs/development/libraries/portaudio/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index c1c76a90017..d96a85fb833 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -3,6 +3,7 @@ , fetchurl , alsa-lib , pkg-config +, which , AudioUnit , AudioToolbox , CoreAudio @@ -18,7 +19,7 @@ stdenv.mkDerivation rec { sha256 = "1vrdrd42jsnffh6rq8ap2c6fr4g9fcld89z649fs06bwqx1bzvs7"; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config which ]; buildInputs = lib.optional (!stdenv.isDarwin) alsa-lib; configureFlags = [ "--disable-mac-universal" "--enable-cxx" ]; @@ -34,6 +35,11 @@ stdenv.mkDerivation rec { # https://github.com/PortAudio/portaudio/commit/28d2781d9216115543aa3f0a0ffb7b4ee0fac551.patch enableParallelBuilding = false; + postPatch = '' + # workaround for the configure script which expects an absolute path + export AR=$(which $AR) + ''; + # not sure why, but all the headers seem to be installed by the make install installPhase = '' make install From a0aeec7e43d0e162070340e5986f6e8caa22f4a6 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 7 Jun 2022 10:52:11 +0800 Subject: [PATCH 2/2] portaudio: set strictDeps --- pkgs/development/libraries/portaudio/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index d96a85fb833..22ff1e450c1 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { sha256 = "1vrdrd42jsnffh6rq8ap2c6fr4g9fcld89z649fs06bwqx1bzvs7"; }; + strictDeps = true; nativeBuildInputs = [ pkg-config which ]; buildInputs = lib.optional (!stdenv.isDarwin) alsa-lib;