sox: remove ? null from inputs, cleanup meta, enable pulseaudio only on linux
This commit is contained in:
parent
4bb2c88d0d
commit
d81070c891
1 changed files with 33 additions and 35 deletions
|
@ -5,36 +5,34 @@
|
|||
, pkg-config
|
||||
, CoreAudio
|
||||
, enableAlsa ? true
|
||||
, alsa-lib ? null
|
||||
, alsa-lib
|
||||
, enableLibao ? true
|
||||
, libao ? null
|
||||
, libao
|
||||
, enableLame ? config.sox.enableLame or false
|
||||
, lame ? null
|
||||
, lame
|
||||
, enableLibmad ? true
|
||||
, libmad ? null
|
||||
, libmad
|
||||
, enableLibogg ? true
|
||||
, libogg ? null
|
||||
, libvorbis ? null
|
||||
, libogg
|
||||
, libvorbis
|
||||
, enableOpusfile ? true
|
||||
, opusfile ? null
|
||||
, opusfile
|
||||
, enableFLAC ? true
|
||||
, flac ? null
|
||||
, flac
|
||||
, enablePNG ? true
|
||||
, libpng ? null
|
||||
, libpng
|
||||
, enableLibsndfile ? true
|
||||
, libsndfile ? null
|
||||
, libsndfile
|
||||
, enableWavpack ? true
|
||||
, wavpack ? null
|
||||
, wavpack
|
||||
# amrnb and amrwb are unfree, disabled by default
|
||||
, enableAMR ? false
|
||||
, amrnb ? null
|
||||
, amrwb ? null
|
||||
, enableLibpulseaudio ? true
|
||||
, libpulseaudio ? null
|
||||
, amrnb
|
||||
, amrwb
|
||||
, enableLibpulseaudio ? stdenv.isLinux
|
||||
, libpulseaudio
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sox";
|
||||
version = "14.4.2";
|
||||
|
@ -45,30 +43,30 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
# configure.ac uses pkg-config only to locate libopusfile
|
||||
nativeBuildInputs = optional enableOpusfile pkg-config;
|
||||
nativeBuildInputs = lib.optional enableOpusfile pkg-config;
|
||||
|
||||
patches = [ ./0001-musl-rewind-pipe-workaround.patch ];
|
||||
|
||||
buildInputs =
|
||||
optional (enableAlsa && stdenv.isLinux) alsa-lib ++
|
||||
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 ++
|
||||
optional enableWavpack wavpack ++
|
||||
optionals enableAMR [ amrnb amrwb ] ++
|
||||
optional enableLibpulseaudio libpulseaudio ++
|
||||
optional (stdenv.isDarwin) CoreAudio;
|
||||
lib.optional (enableAlsa && stdenv.isLinux) alsa-lib
|
||||
++ lib.optional enableLibao libao
|
||||
++ lib.optional enableLame lame
|
||||
++ lib.optional enableLibmad libmad
|
||||
++ lib.optionals enableLibogg [ libogg libvorbis ]
|
||||
++ lib.optional enableOpusfile opusfile
|
||||
++ lib.optional enableFLAC flac
|
||||
++ lib.optional enablePNG libpng
|
||||
++ lib.optional enableLibsndfile libsndfile
|
||||
++ lib.optional enableWavpack wavpack
|
||||
++ lib.optionals enableAMR [ amrnb amrwb ]
|
||||
++ lib.optional enableLibpulseaudio libpulseaudio
|
||||
++ lib.optional stdenv.isDarwin CoreAudio;
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Sample Rate Converter for audio";
|
||||
homepage = "http://sox.sourceforge.net/";
|
||||
maintainers = [ lib.maintainers.marcweber ];
|
||||
license = if enableAMR then lib.licenses.unfree else lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
maintainers = with maintainers; [ marcweber ];
|
||||
license = if enableAMR then licenses.unfree else licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue