git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit508555518df17e7b31cc46d6edca1531790d57f7 authorArtemis Tosini <me@artem.ist> dateMon 29 Apr 2019, 14:23 (8 years ago) parente4218a2
1 file changed+6−1
pkgs/applications/misc/audio/sox/default.nix+6−1
pkgs/applications/misc/audio/sox/default.nix+6−1
@@ -1,9 +1,10 @@
1−{ config, lib, stdenv, fetchurl, CoreAudio
1+{ config, lib, stdenv, fetchurl, pkgconfig, CoreAudio
22, enableAlsa ? true, alsaLib ? null
33, enableLibao ? true, libao ? null
44, enableLame ? config.sox.enableLame or false, lame ? null
55, enableLibmad ? true, libmad ? null
66, enableLibogg ? true, libogg ? null, libvorbis ? null
7+, enableOpusfile ? true, opusfile ? null
78, enableFLAC ? true, flac ? null
89, enablePNG ? true, libpng ? null
910, enableLibsndfile ? true, libsndfile ? null
@@ -22,12 +23,16 @@ stdenv.mkDerivation rec {
2223 sha256 = "0v2znlxkxxcd3f48hf3dx9pq7i6fdhb62kgj7wv8xggz8f35jpxl";
2324 };
2425
26+ # configure.ac uses pkg-config only to locate libopusfile
27+ nativeBuildInputs = optional enableOpusfile pkgconfig;
28+
2529 buildInputs =
2630 optional (enableAlsa && stdenv.isLinux) alsaLib ++
2731 optional enableLibao libao ++
2832 optional enableLame lame ++
2933 optional enableLibmad libmad ++
3034 optionals enableLibogg [ libogg libvorbis ] ++
35+ optional enableOpusfile opusfile ++
3136 optional enableFLAC flac ++
3237 optional enablePNG libpng ++
3338 optional enableLibsndfile libsndfile ++