mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
lame: replace mkFlag with lib.enableFeature
This commit is contained in:
parent
9d0d1d499e
commit
54ed2aa8c1
|
@ -11,10 +11,6 @@
|
||||||
, debugSupport ? false # Debugging (disables optimizations)
|
, debugSupport ? false # Debugging (disables optimizations)
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
|
|
||||||
in
|
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lame";
|
pname = "lame";
|
||||||
|
@ -37,16 +33,16 @@ stdenv.mkDerivation rec {
|
||||||
++ optional sndfileFileIOSupport libsndfile;
|
++ optional sndfileFileIOSupport libsndfile;
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
(mkFlag nasmSupport "nasm")
|
(enableFeature nasmSupport "nasm")
|
||||||
(mkFlag cpmlSupport "cpml")
|
(enableFeature cpmlSupport "cpml")
|
||||||
#(mkFlag efenceSupport "efence")
|
#(enableFeature efenceSupport "efence")
|
||||||
(if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame")
|
(if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame")
|
||||||
(mkFlag analyzerHooksSupport "analyzer-hooks")
|
(enableFeature analyzerHooksSupport "analyzer-hooks")
|
||||||
(mkFlag decoderSupport "decoder")
|
(enableFeature decoderSupport "decoder")
|
||||||
(mkFlag frontendSupport "frontend")
|
(enableFeature frontendSupport "frontend")
|
||||||
(mkFlag frontendSupport "dynamic-frontends")
|
(enableFeature frontendSupport "dynamic-frontends")
|
||||||
#(mkFlag mp3xSupport "mp3x")
|
#(enableFeature mp3xSupport "mp3x")
|
||||||
(mkFlag mp3rtpSupport "mp3rtp")
|
(enableFeature mp3rtpSupport "mp3rtp")
|
||||||
(if debugSupport then "--enable-debug=alot" else "")
|
(if debugSupport then "--enable-debug=alot" else "")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue