From 3a1a7b2d6ab4509453f211125ab7d76018e95ca3 Mon Sep 17 00:00:00 2001 From: "Jason \\\"Don\\\" O'Conal" Date: Thu, 4 Jul 2013 14:59:41 +1000 Subject: [PATCH] libsamplerate: fix build on darwin * build with gccApple * add Carbon include path --- .../libraries/libsamplerate/default.nix | 19 ++++++++++++------- pkgs/top-level/all-packages.nix | 6 +++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix index 17f06e46711..3b7434dc9fb 100644 --- a/pkgs/development/libraries/libsamplerate/default.nix +++ b/pkgs/development/libraries/libsamplerate/default.nix @@ -15,14 +15,19 @@ stdenv.mkDerivation rec { #--disable-fftw disable usage of FFTW #--disable-cpu-clip disable tricky cpu specific clipper - meta = { + # 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"; + + meta = with stdenv.lib; { description = "Sample Rate Converter for audio"; - homepage = http://www.mega-nerd.com/SRC/index.html; + homepage = http://www.mega-nerd.com/SRC/index.html; # you can choose one of the following licenses: - license = [ - "GPL" - # http://www.mega-nerd.com/SRC/libsamplerate-cul.pdf - "libsamplerate Commercial Use License" - ]; + # GPL or a commercial-use license (available at + # http://www.mega-nerd.com/SRC/libsamplerate-cul.pdf) + licenses = with licenses; [ gpl unfree ]; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.all; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 66116c1266a..ba18fd850e4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4618,7 +4618,11 @@ let libre = callPackage ../development/libraries/libre {}; librem = callPackage ../development/libraries/librem {}; - libsamplerate = callPackage ../development/libraries/libsamplerate { }; + libsamplerate = callPackage ../development/libraries/libsamplerate { + stdenv = if stdenv.isDarwin + then overrideGCC stdenv gccApple + else stdenv; + }; libspectre = callPackage ../development/libraries/libspectre { };