3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/audio/sox/default.nix

51 lines
1.7 KiB
Nix
Raw Normal View History

{ config, lib, stdenv, fetchurl, pkgconfig, CoreAudio
, enableAlsa ? true, alsaLib ? null
, enableLibao ? true, libao ? null
2019-02-03 15:33:32 +00:00
, enableLame ? config.sox.enableLame or false, lame ? null
, enableLibmad ? true, libmad ? null
, enableLibogg ? true, libogg ? null, libvorbis ? null
, enableOpusfile ? true, opusfile ? null
, enableFLAC ? true, flac ? null
, enablePNG ? true, libpng ? null
, 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
}:
with stdenv.lib;
stdenv.mkDerivation rec {
2015-09-12 12:49:41 +01:00
name = "sox-14.4.2";
src = fetchurl {
url = "mirror://sourceforge/sox/${name}.tar.gz";
2015-09-12 12:49:41 +01:00
sha256 = "0v2znlxkxxcd3f48hf3dx9pq7i6fdhb62kgj7wv8xggz8f35jpxl";
};
# configure.ac uses pkg-config only to locate libopusfile
nativeBuildInputs = optional enableOpusfile pkgconfig;
buildInputs =
optional (enableAlsa && stdenv.isLinux) alsaLib ++
optional enableLibao libao ++
optional enableLame lame ++
optional enableLibmad libmad ++
optionals enableLibogg [ libogg libvorbis ] ++
optional enableOpusfile opusfile ++
optional enableFLAC flac ++
optional enablePNG libpng ++
optional enableLibsndfile libsndfile ++
2017-03-24 14:46:16 +00:00
optionals enableAMR [ amrnb amrwb ] ++
optional enableLibpulseaudio libpulseaudio ++
optional (stdenv.isDarwin) CoreAudio;
meta = {
description = "Sample Rate Converter for audio";
homepage = http://sox.sourceforge.net/;
2015-07-01 13:11:05 +01:00
maintainers = [ lib.maintainers.marcweber ];
license = if enableAMR then lib.licenses.unfree else lib.licenses.gpl2Plus;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}