summary refs log tree commit diff
path: root/pkgs/servers/pulseaudio
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-08-03 15:15:03 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-11-24 15:17:13 -0800
commit18ba22baba75abd245a8e167213003f60824acf0 (patch)
tree0ae97e3eb1c1a281fcd91cc358c50233f52320f1 /pkgs/servers/pulseaudio
parent3ed6885aa8fdec8dee00bb746fc8ed9edb303d81 (diff)
downloadnixpkgs-18ba22baba75abd245a8e167213003f60824acf0.tar
nixpkgs-18ba22baba75abd245a8e167213003f60824acf0.tar.gz
nixpkgs-18ba22baba75abd245a8e167213003f60824acf0.tar.bz2
nixpkgs-18ba22baba75abd245a8e167213003f60824acf0.tar.lz
nixpkgs-18ba22baba75abd245a8e167213003f60824acf0.tar.xz
nixpkgs-18ba22baba75abd245a8e167213003f60824acf0.tar.zst
nixpkgs-18ba22baba75abd245a8e167213003f60824acf0.zip
pulseaudio: Remove /usr/include impurity on Darwin
Diffstat (limited to 'pkgs/servers/pulseaudio')
-rw-r--r--pkgs/servers/pulseaudio/default.nix13
1 files changed, 4 insertions, 9 deletions
diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix
index a2836be7ef8..aecf46efe41 100644
--- a/pkgs/servers/pulseaudio/default.nix
+++ b/pkgs/servers/pulseaudio/default.nix
@@ -26,7 +26,7 @@
 , # Whether to build only the library.
   libOnly ? false
 
-, CoreServices, AudioUnit, Cocoa
+, AudioUnit, Cocoa, CoreServices, Libc, sdk
 }:
 
 stdenv.mkDerivation rec {
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ libtool libsndfile soxr speexdsp fftwFloat ]
     ++ lib.optionals stdenv.isLinux [ glib dbus ]
-    ++ lib.optionals stdenv.isDarwin [ CoreServices AudioUnit Cocoa ]
+    ++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreServices Libc ]
     ++ lib.optionals (!libOnly) (
       [ libasyncns webrtc-audio-processing ]
       ++ lib.optional jackaudioSupport libjack2
@@ -94,7 +94,7 @@ stdenv.mkDerivation rec {
     ]
     ++ lib.optional (jackaudioSupport && !libOnly) "--enable-jack"
     ++ lib.optionals stdenv.isDarwin [
-      "--with-mac-sysroot=/"
+      "--with-mac-sysroot=${sdk}"
       "--disable-neon-opt"
     ]
     ++ lib.optional (stdenv.isLinux && useSystemd) "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
@@ -102,12 +102,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  # not sure what the best practices are here -- can't seem to find a way
-  # for the compiler to bring in stdlib and stdio (etc.) properly
-  # the alternative is to copy the files from /usr/include to src, but there are
-  # probably a large number of files that would need to be copied (I stopped
-  # after the seventh)
-  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I/usr/include";
+  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${Libc}";
 
   installFlags =
     [ "sysconfdir=${placeholder "out"}/etc"