libsamplerate: fix missing darwin frameworks

This commit is contained in:
Daiderd Jordan 2016-08-07 18:20:06 +02:00
parent b660ed3258
commit e2fdd74a41
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
2 changed files with 16 additions and 11 deletions

View File

@ -1,6 +1,9 @@
{ stdenv, fetchurl, pkgconfig, libsndfile }: { stdenv, fetchurl, pkgconfig, libsndfile, ApplicationServices, Carbon, CoreServices }:
stdenv.mkDerivation rec { let
inherit (stdenv.lib) optionals optionalString;
in stdenv.mkDerivation rec {
name = "libsamplerate-0.1.8"; name = "libsamplerate-0.1.8";
src = fetchurl { src = fetchurl {
@ -9,7 +12,8 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libsndfile ]; buildInputs = [ libsndfile ]
++ optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
# maybe interesting configure flags: # maybe interesting configure flags:
#--disable-fftw disable usage of FFTW #--disable-fftw disable usage of FFTW
@ -17,14 +21,13 @@ stdenv.mkDerivation rec {
outputs = [ "dev" "bin" "out" ]; outputs = [ "dev" "bin" "out" ];
postConfigure = stdenv.lib.optionalString stdenv.isDarwin postConfigure = optionalString stdenv.isDarwin ''
'' # need headers from the Carbon.framework in /System/Library/Frameworks to
# need headers from the Carbon.framework in /System/Library/Frameworks to # compile this on darwin -- not sure how to handle
# compile this on darwin -- not sure how to handle NIX_CFLAGS_COMPILE+=" -I${Carbon}/Library/Frameworks/Carbon.framework/Headers"
NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers"
substituteInPlace examples/Makefile --replace "-fpascal-strings" "" substituteInPlace examples/Makefile --replace "-fpascal-strings" ""
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Sample Rate Converter for audio"; description = "Sample Rate Converter for audio";

View File

@ -8203,7 +8203,9 @@ in
librevisa = callPackage ../development/libraries/librevisa { }; librevisa = callPackage ../development/libraries/librevisa { };
libsamplerate = callPackage ../development/libraries/libsamplerate { }; libsamplerate = callPackage ../development/libraries/libsamplerate {
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon CoreServices;
};
libsieve = callPackage ../development/libraries/libsieve { }; libsieve = callPackage ../development/libraries/libsieve { };