2016-08-07 17:20:06 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libsndfile, ApplicationServices, Carbon, CoreServices }:
|
2007-10-22 01:51:40 +01:00
|
|
|
|
2016-08-07 17:20:06 +01:00
|
|
|
let
|
|
|
|
inherit (stdenv.lib) optionals optionalString;
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2016-10-13 02:12:33 +01:00
|
|
|
name = "libsamplerate-0.1.9";
|
2008-12-20 01:20:35 +00:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.mega-nerd.com/SRC/${name}.tar.gz";
|
2016-10-13 02:12:33 +01:00
|
|
|
sha256 = "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha";
|
2008-12-20 01:20:35 +00:00
|
|
|
};
|
2007-10-22 01:51:40 +01:00
|
|
|
|
2015-05-02 01:49:58 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-08-07 17:20:06 +01:00
|
|
|
buildInputs = [ libsndfile ]
|
|
|
|
++ optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
|
2010-07-30 21:17:37 +01:00
|
|
|
|
2016-10-13 02:12:33 +01:00
|
|
|
configureFlags = [ "--disable-fftw" ];
|
2007-10-22 01:51:40 +01:00
|
|
|
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "bin" "dev" "out" ];
|
2012-08-23 21:21:45 +01:00
|
|
|
|
2016-08-07 17:20:06 +01:00
|
|
|
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"
|
2014-07-23 10:45:44 +01:00
|
|
|
|
2016-08-07 17:20:06 +01:00
|
|
|
substituteInPlace examples/Makefile --replace "-fpascal-strings" ""
|
|
|
|
'';
|
2013-07-04 05:59:41 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2008-12-20 01:20:35 +00:00
|
|
|
description = "Sample Rate Converter for audio";
|
2013-07-04 05:59:41 +01:00
|
|
|
homepage = http://www.mega-nerd.com/SRC/index.html;
|
2017-04-29 11:34:11 +01:00
|
|
|
license = licenses.bsd2;
|
2015-05-02 01:49:58 +01:00
|
|
|
maintainers = with maintainers; [ lovek323 wkennington ];
|
2013-07-04 05:59:41 +01:00
|
|
|
platforms = platforms.all;
|
2007-10-22 01:51:40 +01:00
|
|
|
};
|
2008-12-20 01:20:35 +00:00
|
|
|
}
|