about summary refs log tree commit diff
path: root/pkgs/development/libraries/lame
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2022-06-29 21:32:20 +0200
committerPavol Rusnak <pavol@rusnak.io>2022-07-09 13:32:45 +0200
commit54ed2aa8c177aab0fd8d801e9ae2e4a6d105e6df (patch)
tree75f0717f9b88ac8afa02933068275558f3b797a5 /pkgs/development/libraries/lame
parent9d0d1d499ef0919a2bd3ec97cbad9dcd08d5f003 (diff)
lame: replace mkFlag with lib.enableFeature
Diffstat (limited to 'pkgs/development/libraries/lame')
-rw-r--r--pkgs/development/libraries/lame/default.nix22
1 files changed, 9 insertions, 13 deletions
diff --git a/pkgs/development/libraries/lame/default.nix b/pkgs/development/libraries/lame/default.nix
index ec79f8cf6008d..94f2ab39b96f5 100644
--- a/pkgs/development/libraries/lame/default.nix
+++ b/pkgs/development/libraries/lame/default.nix
@@ -11,10 +11,6 @@
 , debugSupport ? false # Debugging (disables optimizations)
 }:
 
-let
-  mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
-in
-
 with lib;
 stdenv.mkDerivation rec {
   pname = "lame";
@@ -37,16 +33,16 @@ stdenv.mkDerivation rec {
     ++ optional sndfileFileIOSupport libsndfile;
 
   configureFlags = [
-    (mkFlag nasmSupport "nasm")
-    (mkFlag cpmlSupport "cpml")
-    #(mkFlag efenceSupport "efence")
+    (enableFeature nasmSupport "nasm")
+    (enableFeature cpmlSupport "cpml")
+    #(enableFeature efenceSupport "efence")
     (if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame")
-    (mkFlag analyzerHooksSupport "analyzer-hooks")
-    (mkFlag decoderSupport "decoder")
-    (mkFlag frontendSupport "frontend")
-    (mkFlag frontendSupport "dynamic-frontends")
-    #(mkFlag mp3xSupport "mp3x")
-    (mkFlag mp3rtpSupport "mp3rtp")
+    (enableFeature analyzerHooksSupport "analyzer-hooks")
+    (enableFeature decoderSupport "decoder")
+    (enableFeature frontendSupport "frontend")
+    (enableFeature frontendSupport "dynamic-frontends")
+    #(enableFeature mp3xSupport "mp3x")
+    (enableFeature mp3rtpSupport "mp3rtp")
     (if debugSupport then "--enable-debug=alot" else "")
   ];