sox: Add option to include opus support

Many other distributions include opus support in their sox
distributions. This patch makes such an option, and sets it
to be enabled by default. This works when ogg is disabled as
as well as when ogg is enabled.
This commit is contained in:
Artemis Tosini 2019-04-29 14:23:39 +00:00
parent e4218a22a6
commit 508555518d
No known key found for this signature in database
GPG Key ID: EE5227935FE3FF18

View File

@ -1,9 +1,10 @@
{ config, lib, stdenv, fetchurl, CoreAudio
{ config, lib, stdenv, fetchurl, pkgconfig, CoreAudio
, enableAlsa ? true, alsaLib ? null
, enableLibao ? true, libao ? null
, 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
@ -22,12 +23,16 @@ stdenv.mkDerivation rec {
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 ++