diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/wiredtiger')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/wiredtiger/default.nix | 33 |
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 = '' |