at v192 1.3 kB view raw
1{ stdenv, fetchurl, pkgconfig 2, fftw, libsndfile 3}: 4 5stdenv.mkDerivation rec { 6 name = "libsamplerate-0.1.8"; 7 8 src = fetchurl { 9 url = "http://www.mega-nerd.com/SRC/${name}.tar.gz"; 10 sha256 = "01hw5xjbjavh412y63brcslj5hi9wdgkjd3h9csx5rnm8vglpdck"; 11 }; 12 13 nativeBuildInputs = [ pkgconfig ]; 14 buildInputs = [ fftw libsndfile ]; 15 16 # maybe interesting configure flags: 17 #--disable-fftw disable usage of FFTW 18 #--disable-cpu-clip disable tricky cpu specific clipper 19 20 postConfigure = stdenv.lib.optionalString stdenv.isDarwin 21 '' 22 # need headers from the Carbon.framework in /System/Library/Frameworks to 23 # compile this on darwin -- not sure how to handle 24 NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" 25 26 substituteInPlace examples/Makefile --replace "-fpascal-strings" "" 27 ''; 28 29 meta = with stdenv.lib; { 30 description = "Sample Rate Converter for audio"; 31 homepage = http://www.mega-nerd.com/SRC/index.html; 32 # you can choose one of the following licenses: 33 # GPL or a commercial-use license (available at 34 # http://www.mega-nerd.com/SRC/libsamplerate-cul.pdf) 35 licenses = with licenses; [ gpl3.shortName unfree ]; 36 maintainers = with maintainers; [ lovek323 wkennington ]; 37 platforms = platforms.all; 38 }; 39}