about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/wiredtiger
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/libraries/wiredtiger
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/wiredtiger')
-rw-r--r--nixpkgs/pkgs/development/libraries/wiredtiger/default.nix33
1 files changed, 13 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/development/libraries/wiredtiger/default.nix b/nixpkgs/pkgs/development/libraries/wiredtiger/default.nix
index b6064c42b5c9..69fc38c9a74e 100644
--- a/nixpkgs/pkgs/development/libraries/wiredtiger/default.nix
+++ b/nixpkgs/pkgs/development/libraries/wiredtiger/default.nix
@@ -7,13 +7,6 @@
 
 with lib;
 let
-  mkFlag = trueStr: falseStr: cond: name: val: "--"
-    + (if cond then trueStr else falseStr)
-    + name
-    + optionalString (val != null && cond != false) "=${val}";
-  mkEnable = mkFlag "enable-" "disable-";
-  mkWith = mkFlag "with-" "without-";
-
   shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
 
   optLz4 = shouldUsePkg lz4;
@@ -39,19 +32,19 @@ stdenv.mkDerivation rec {
   buildInputs = [ optLz4 optSnappy optZlib optBzip2 optDb optGperftools optLeveldb ];
 
   configureFlags = [
-    (mkWith   false                   "attach"     null)
-    (mkWith   true                    "builtins"   "")
-    (mkEnable (optBzip2 != null)      "bzip2"      null)
-    (mkEnable false                   "diagnostic" null)
-    (mkEnable false                   "java"       null)
-    (mkEnable (optLeveldb != null)    "leveldb"    null)
-    (mkEnable false                   "python"     null)
-    (mkEnable (optSnappy != null)     "snappy"     null)
-    (mkEnable (optLz4 != null)        "lz4"        null)
-    (mkEnable (optGperftools != null) "tcmalloc"   null)
-    (mkEnable (optZlib != null)       "zlib"       null)
-    (mkWith   (optDb != null)         "berkeleydb" optDb)
-    (mkWith   false                   "helium"     null)
+    (withFeature   false                   "attach")
+    (withFeatureAs true                    "builtins" "")
+    (enableFeature (optBzip2 != null)      "bzip2")
+    (enableFeature false                   "diagnostic")
+    (enableFeature false                   "java")
+    (enableFeature (optLeveldb != null)    "leveldb")
+    (enableFeature false                   "python")
+    (enableFeature (optSnappy != null)     "snappy")
+    (enableFeature (optLz4 != null)        "lz4")
+    (enableFeature (optGperftools != null) "tcmalloc")
+    (enableFeature (optZlib != null)       "zlib")
+    (withFeatureAs (optDb != null)         "berkeleydb" optDb)
+    (withFeature   false                   "helium")
   ];
 
   preConfigure = ''