libsndfile: fix build on darwin

* build with gccApple
* add Carbon headers to include path
This commit is contained in:
Jason \"Don\" O'Conal 2013-07-04 15:02:09 +10:00 committed by Rok Garbas
parent 3a1a7b2d6a
commit dcc4ffdb7f
2 changed files with 34 additions and 27 deletions

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, flac, libogg, libvorbis, pkgconfig }: { stdenv, fetchurl, flac, libogg, libvorbis, pkgconfig }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libsndfile-1.0.23"; name = "libsndfile-1.0.23";
@ -8,35 +8,38 @@ stdenv.mkDerivation rec {
sha256 = "0k9x4804gfh9d9zd4rm1v2izm8l716rzk4d6jlrjcf45b5sw7jal"; sha256 = "0k9x4804gfh9d9zd4rm1v2izm8l716rzk4d6jlrjcf45b5sw7jal";
}; };
buildInputs = [pkgconfig flac libogg libvorbis]; buildInputs = [ pkgconfig flac libogg libvorbis ];
meta = { # need headers from the Carbon.framework in /System/Library/Frameworks to
description = "Libsndfile, a C library for reading and writing files containing sampled sound"; # 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";
longDescription = meta = with stdenv.lib; {
'' Libsndfile is a C library for reading and writing files containing description = "A C library for reading and writing files containing sampled sound";
sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) homepage = http://www.mega-nerd.com/libsndfile/;
through one standard library interface. It is released in source license = licenses.lgpl2Plus;
code format under the GNU Lesser General Public License. maintainers = with maintainers; [ lovek323 ludo ];
platfomrs = platforms.unix;
The library was written to compile and run on a Linux system but longDescription = ''
should compile and run on just about any Unix (including MacOS X). Libsndfile is a C library for reading and writing files containing
There are also pre-compiled binaries available for 32 and 64 bit sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format)
windows. through one standard library interface. It is released in source
code format under the GNU Lesser General Public License.
It was designed to handle both little-endian (such as WAV) and The library was written to compile and run on a Linux system but
big-endian (such as AIFF) data, and to compile and run correctly on should compile and run on just about any Unix (including MacOS X).
little-endian (such as Intel and DEC/Compaq Alpha) processor systems There are also pre-compiled binaries available for 32 and 64 bit
as well as big-endian processor systems such as Motorola 68k, Power windows.
PC, MIPS and SPARC. Hopefully the design of the library will also
make it easy to extend for reading and writing new sound file
formats.
'';
homepage = http://www.mega-nerd.com/libsndfile/; It was designed to handle both little-endian (such as WAV) and
big-endian (such as AIFF) data, and to compile and run correctly on
license = "LGPLv2+"; little-endian (such as Intel and DEC/Compaq Alpha) processor systems
as well as big-endian processor systems such as Motorola 68k, Power
maintainers = [ stdenv.lib.maintainers.ludo ]; PC, MIPS and SPARC. Hopefully the design of the library will also
make it easy to extend for reading and writing new sound file
formats.
'';
}; };
} }

View File

@ -4781,7 +4781,11 @@ let
# To bootstrap SBCL, I need CLisp 2.44.1; it needs libsigsegv 2.5 # To bootstrap SBCL, I need CLisp 2.44.1; it needs libsigsegv 2.5
libsigsegv_25 = callPackage ../development/libraries/libsigsegv/2.5.nix { }; libsigsegv_25 = callPackage ../development/libraries/libsigsegv/2.5.nix { };
libsndfile = callPackage ../development/libraries/libsndfile { }; libsndfile = callPackage ../development/libraries/libsndfile {
stdenv = if stdenv.isDarwin
then overrideGCC stdenv gccApple
else stdenv;
};
libsoup = callPackage ../development/libraries/libsoup { }; libsoup = callPackage ../development/libraries/libsoup { };