@@ -6,6 +6,9 @@
66, enableLibogg ? true, libogg ? null, libvorbis ? null
77, enableFLAC ? true, flac ? null
88, enablePNG ? true, libpng ? null
9+, enableLibsndfile ? true, libsndfile ? null
10+# amrnb and amrwb are unfree, disabled by default
11+, enableAMR ? false, amrnb ? null, amrwb ? null
912}:
1013
1114with stdenv.lib;
@@ -25,13 +28,15 @@ stdenv.mkDerivation rec {
2528 optional enableLibmad libmad ++
2629 optionals enableLibogg [ libogg libvorbis ] ++
2730 optional enableFLAC flac ++
28− optional enablePNG libpng;
31+ optional enablePNG libpng ++
32+ optional enableLibsndfile libsndfile ++
33+ optionals enableAMR [ amrnb amrwb ];
2934
3035 meta = {
3136 description = "Sample Rate Converter for audio";
3237 homepage = http://sox.sourceforge.net/;
3338 maintainers = [ lib.maintainers.marcweber ];
34− license = lib.licenses.gpl2Plus;
39+ license = if enableAMR then lib.licenses.unfree else lib.licenses.gpl2Plus;
3540 platforms = lib.platforms.linux ++ lib.platforms.darwin;
3641 };
3742}