From 922af7f1588e78041ef7102f0c505a6a055a7b04 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 23 Jul 2014 11:00:41 +0200 Subject: [PATCH] libsndfile: Fix build on Darwin Fixes #3347. --- pkgs/development/libraries/libsndfile/default.nix | 9 +++++++-- pkgs/top-level/all-packages.nix | 6 +----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libsndfile/default.nix b/pkgs/development/libraries/libsndfile/default.nix index 8b0eeeb8e572..f97bd040a544 100644 --- a/pkgs/development/libraries/libsndfile/default.nix +++ b/pkgs/development/libraries/libsndfile/default.nix @@ -12,8 +12,13 @@ stdenv.mkDerivation rec { # need headers from the Carbon.framework in /System/Library/Frameworks to # compile this on darwin -- not sure how to handle - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin - "-I/System/Library/Frameworks/Carbon.framework/Versions/A/Headers"; + preConfigure = stdenv.lib.optionalString stdenv.isDarwin + '' + NIX_CFLAGS_COMPILE+=" -I$xcodePath/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" + ''; + + # Needed on Darwin. + NIX_CFLAGS_LINK = "-logg -lvorbis"; meta = with stdenv.lib; { description = "A C library for reading and writing files containing sampled sound"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 879570690490..df1ac5dc24a0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5463,11 +5463,7 @@ let # To bootstrap SBCL, I need CLisp 2.44.1; it needs libsigsegv 2.5 libsigsegv_25 = callPackage ../development/libraries/libsigsegv/2.5.nix { }; - libsndfile = callPackage ../development/libraries/libsndfile { - stdenv = if stdenv.isDarwin - then overrideGCC stdenv gccApple - else stdenv; - }; + libsndfile = callPackage ../development/libraries/libsndfile { }; libsodium = callPackage ../development/libraries/libsodium { };