diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2016-08-07 18:20:06 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2016-08-07 18:20:17 +0200 |
commit | e2fdd74a41fb8859f72e4f26636df79b046caee5 (patch) | |
tree | 1d54827aca1ace039b92d8bf5fbc793b9013eb47 | |
parent | b660ed3258f8a9e0ceb753ba41584eafc953290f (diff) | |
download | nixpkgs-e2fdd74a41fb8859f72e4f26636df79b046caee5.tar nixpkgs-e2fdd74a41fb8859f72e4f26636df79b046caee5.tar.gz nixpkgs-e2fdd74a41fb8859f72e4f26636df79b046caee5.tar.bz2 nixpkgs-e2fdd74a41fb8859f72e4f26636df79b046caee5.tar.lz nixpkgs-e2fdd74a41fb8859f72e4f26636df79b046caee5.tar.xz nixpkgs-e2fdd74a41fb8859f72e4f26636df79b046caee5.tar.zst nixpkgs-e2fdd74a41fb8859f72e4f26636df79b046caee5.zip |
libsamplerate: fix missing darwin frameworks
-rw-r--r-- | pkgs/development/libraries/libsamplerate/default.nix | 23 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 16 insertions, 11 deletions
diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix index f0ff549c716..771e31f7b79 100644 --- a/pkgs/development/libraries/libsamplerate/default.nix +++ b/pkgs/development/libraries/libsamplerate/default.nix @@ -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"; src = fetchurl { @@ -9,7 +12,8 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libsndfile ]; + buildInputs = [ libsndfile ] + ++ optionals stdenv.isDarwin [ ApplicationServices CoreServices ]; # maybe interesting configure flags: #--disable-fftw disable usage of FFTW @@ -17,14 +21,13 @@ stdenv.mkDerivation rec { outputs = [ "dev" "bin" "out" ]; - postConfigure = stdenv.lib.optionalString stdenv.isDarwin - '' - # need headers from the Carbon.framework in /System/Library/Frameworks to - # compile this on darwin -- not sure how to handle - NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" + postConfigure = optionalString stdenv.isDarwin '' + # need headers from the Carbon.framework in /System/Library/Frameworks to + # compile this on darwin -- not sure how to handle + NIX_CFLAGS_COMPILE+=" -I${Carbon}/Library/Frameworks/Carbon.framework/Headers" - substituteInPlace examples/Makefile --replace "-fpascal-strings" "" - ''; + substituteInPlace examples/Makefile --replace "-fpascal-strings" "" + ''; meta = with stdenv.lib; { description = "Sample Rate Converter for audio"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index addf42c696a..1d2afc37c6d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8203,7 +8203,9 @@ in 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 { }; |