2015-11-11 22:55:44 +01:00
|
|
|
{ stdenv, fetchurl, flac, libogg, libvorbis, pkgconfig
|
2016-05-06 00:39:58 +02:00
|
|
|
, Carbon, AudioToolbox
|
2015-11-11 22:55:44 +01:00
|
|
|
}:
|
2005-10-26 17:58:09 +02:00
|
|
|
|
2012-08-25 02:43:48 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2016-08-30 18:53:31 +02:00
|
|
|
name = "libsndfile-1.0.27";
|
2009-12-13 21:19:03 +01:00
|
|
|
|
2005-10-26 17:58:09 +02:00
|
|
|
src = fetchurl {
|
2009-12-13 21:19:03 +01:00
|
|
|
url = "http://www.mega-nerd.com/libsndfile/files/${name}.tar.gz";
|
2016-08-30 18:53:31 +02:00
|
|
|
sha256 = "1h7s61nhf7vklh9sdsbbqzb6x287q4x4j1jc5gmjragl4wprb4d3";
|
2009-12-13 21:19:03 +01:00
|
|
|
};
|
|
|
|
|
2015-11-11 22:55:44 +01:00
|
|
|
buildInputs = [ pkgconfig flac libogg libvorbis ]
|
2016-05-06 00:39:58 +02:00
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ Carbon AudioToolbox ];
|
2010-10-28 16:00:41 +02:00
|
|
|
|
2012-08-23 21:01:00 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-08-29 02:30:01 +02:00
|
|
|
outputs = [ "bin" "dev" "out" "doc" ];
|
2012-08-23 21:01:00 +02:00
|
|
|
|
2013-07-04 07:02:09 +02:00
|
|
|
# need headers from the Carbon.framework in /System/Library/Frameworks to
|
|
|
|
# compile this on darwin -- not sure how to handle
|
2014-07-23 11:00:41 +02:00
|
|
|
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
|
|
|
|
''
|
2014-07-24 21:53:46 +02:00
|
|
|
NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers"
|
2014-07-23 11:00:41 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Needed on Darwin.
|
|
|
|
NIX_CFLAGS_LINK = "-logg -lvorbis";
|
2013-07-04 07:02:09 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A C library for reading and writing files containing sampled sound";
|
|
|
|
homepage = http://www.mega-nerd.com/libsndfile/;
|
|
|
|
license = licenses.lgpl2Plus;
|
2013-08-16 23:44:33 +02:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
2015-04-26 05:39:49 +02:00
|
|
|
platforms = platforms.unix;
|
2013-07-04 07:02:09 +02:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Libsndfile is a C library for reading and writing files containing
|
|
|
|
sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format)
|
|
|
|
through one standard library interface. It is released in source
|
|
|
|
code format under the GNU Lesser General Public License.
|
|
|
|
|
|
|
|
The library was written to compile and run on a Linux system but
|
|
|
|
should compile and run on just about any Unix (including MacOS X).
|
|
|
|
There are also pre-compiled binaries available for 32 and 64 bit
|
|
|
|
windows.
|
|
|
|
|
|
|
|
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
|
|
|
|
little-endian (such as Intel and DEC/Compaq Alpha) processor systems
|
|
|
|
as well as big-endian processor systems such as Motorola 68k, Power
|
|
|
|
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.
|
|
|
|
'';
|
2005-10-26 17:58:09 +02:00
|
|
|
};
|
|
|
|
}
|