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