2014-08-08 17:15:54 +01:00
|
|
|
{ lib, stdenv, fetchurl
|
2014-03-24 16:01:20 +00:00
|
|
|
, enableAlsa ? true, alsaLib ? null
|
|
|
|
, enableLibao ? true, libao ? null
|
|
|
|
, enableLame ? false, lame ? null
|
|
|
|
, enableLibmad ? true, libmad ? null
|
|
|
|
, enableLibogg ? true, libogg ? null, libvorbis ? null
|
2014-08-29 18:53:56 +01:00
|
|
|
, enableFLAC ? true, flac ? null
|
|
|
|
, enablePNG ? true, libpng ? null
|
2015-09-12 13:23:30 +01:00
|
|
|
, enableLibsndfile ? true, libsndfile ? null
|
|
|
|
# amrnb and amrwb are unfree, disabled by default
|
|
|
|
, enableAMR ? false, amrnb ? null, amrwb ? null
|
2017-03-24 14:46:16 +00:00
|
|
|
, enableLibpulseaudio ? true, libpulseaudio ? null
|
2014-03-24 16:01:20 +00:00
|
|
|
}:
|
2014-08-08 17:15:54 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-09-12 12:49:41 +01:00
|
|
|
name = "sox-14.4.2";
|
2008-12-20 01:20:35 +00:00
|
|
|
|
2010-07-30 15:47:23 +01:00
|
|
|
src = fetchurl {
|
2014-03-24 16:01:20 +00:00
|
|
|
url = "mirror://sourceforge/sox/${name}.tar.gz";
|
2015-09-12 12:49:41 +01:00
|
|
|
sha256 = "0v2znlxkxxcd3f48hf3dx9pq7i6fdhb62kgj7wv8xggz8f35jpxl";
|
2010-07-30 15:47:23 +01:00
|
|
|
};
|
|
|
|
|
2014-03-24 16:01:20 +00:00
|
|
|
buildInputs =
|
2014-08-08 17:15:54 +01:00
|
|
|
optional (enableAlsa && stdenv.isLinux) alsaLib ++
|
|
|
|
optional enableLibao libao ++
|
|
|
|
optional enableLame lame ++
|
|
|
|
optional enableLibmad libmad ++
|
2014-08-29 18:53:56 +01:00
|
|
|
optionals enableLibogg [ libogg libvorbis ] ++
|
|
|
|
optional enableFLAC flac ++
|
2015-09-12 13:23:30 +01:00
|
|
|
optional enablePNG libpng ++
|
|
|
|
optional enableLibsndfile libsndfile ++
|
2017-03-24 14:46:16 +00:00
|
|
|
optionals enableAMR [ amrnb amrwb ] ++
|
|
|
|
optional enableLibpulseaudio libpulseaudio;
|
2008-12-20 01:20:35 +00:00
|
|
|
|
2009-03-06 23:21:28 +00:00
|
|
|
meta = {
|
|
|
|
description = "Sample Rate Converter for audio";
|
2015-02-15 08:36:42 +00:00
|
|
|
homepage = http://sox.sourceforge.net/;
|
2015-07-01 13:11:05 +01:00
|
|
|
maintainers = [ lib.maintainers.marcweber ];
|
2015-09-12 13:23:30 +01:00
|
|
|
license = if enableAMR then lib.licenses.unfree else lib.licenses.gpl2Plus;
|
2014-08-08 17:15:54 +01:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2007-10-22 01:51:40 +01:00
|
|
|
};
|
2008-12-20 01:20:35 +00:00
|
|
|
}
|