summary refs log tree commit diff
path: root/pkgs/development/libraries/libxml2
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-24 20:13:43 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-02 15:10:43 -0400
commite517da392990b219f81611a615088045f3e04fde (patch)
tree054851dfd63cd01e8163fc9cc69ac7362ecc027e /pkgs/development/libraries/libxml2
parent9d23b95483a63fd93544059798d07f68035f2361 (diff)
downloadnixlib-e517da392990b219f81611a615088045f3e04fde.tar
nixlib-e517da392990b219f81611a615088045f3e04fde.tar.gz
nixlib-e517da392990b219f81611a615088045f3e04fde.tar.bz2
nixlib-e517da392990b219f81611a615088045f3e04fde.tar.lz
nixlib-e517da392990b219f81611a615088045f3e04fde.tar.xz
nixlib-e517da392990b219f81611a615088045f3e04fde.tar.zst
nixlib-e517da392990b219f81611a615088045f3e04fde.zip
libxml2: Use `enableFeature`
Diffstat (limited to 'pkgs/development/libraries/libxml2')
-rw-r--r--pkgs/development/libraries/libxml2/default.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix
index aa78d0d33c08..aea7747c3358 100644
--- a/pkgs/development/libraries/libxml2/default.nix
+++ b/pkgs/development/libraries/libxml2/default.nix
@@ -32,12 +32,13 @@ in stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ zlib findXMLCatalogs ] ++ lib.optional icuSupport icu;
 
-  configureFlags =
-       lib.optional pythonSupport "--with-python=${python}"
-    ++ lib.optional icuSupport    "--with-icu"
-    ++ [ "--exec_prefix=$dev" ]
-    ++ lib.optional enableStatic "--enable-static"
-    ++ lib.optional (!enableShared) "--disable-shared";
+  configureFlags = [
+    "--exec_prefix=$dev"
+    (lib.enableFeature enableStatic "static")
+    (lib.enableFeature enableShared "shared")
+    (lib.withFeature icuSupport "icu")
+    (lib.withFeatureAs pythonSupport "python" python)
+  ];
 
   enableParallelBuilding = true;