libsndfile: Fix build on Darwin

Fixes #3347.
This commit is contained in:
Eelco Dolstra 2014-07-23 11:00:41 +02:00
parent a1a3811506
commit 922af7f158
2 changed files with 8 additions and 7 deletions

View File

@ -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";

View File

@ -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 { };