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
|
2014-03-24 16:01:20 +00:00
|
|
|
}:
|
2014-08-08 17:15:54 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-03-24 16:01:20 +00:00
|
|
|
name = "sox-14.4.1";
|
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";
|
|
|
|
sha256 = "16x8gykfjdhxg0kdxwzcwgwpm5caa08y2mx18siqsq0ywmpjr34s";
|
2010-07-30 15:47:23 +01:00
|
|
|
};
|
|
|
|
|
2015-02-15 08:12:29 +00:00
|
|
|
patches = [
|
|
|
|
# Patches for CVE-2014-8145, found via RedHat bug 1174792. It was not
|
|
|
|
# clear whether these address a NULL deref and a division by zero.
|
|
|
|
./0001-Check-for-minimum-size-sphere-headers.patch
|
|
|
|
./0002-More-checks-for-invalid-MS-ADPCM-blocks.patch
|
|
|
|
];
|
|
|
|
|
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 ++
|
|
|
|
optional enablePNG libpng;
|
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/;
|
2014-08-08 17:15:54 +01:00
|
|
|
maintainers = [ lib.maintainers.marcweber lib.maintainers.shlevy ];
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2007-10-22 01:51:40 +01:00
|
|
|
};
|
2008-12-20 01:20:35 +00:00
|
|
|
}
|