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-23 15:37:08 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-24 18:36:59 -0400
commit5be14c5c7459fe014d1a94511b01cce8e957d8e7 (patch)
tree3032b18926f74422bde5814c1f3b147f1dfa10df /pkgs/development/libraries/libxml2
parentd4f5ee8199cedb03b1a81379e2019a29484d3625 (diff)
downloadnixlib-5be14c5c7459fe014d1a94511b01cce8e957d8e7.tar
nixlib-5be14c5c7459fe014d1a94511b01cce8e957d8e7.tar.gz
nixlib-5be14c5c7459fe014d1a94511b01cce8e957d8e7.tar.bz2
nixlib-5be14c5c7459fe014d1a94511b01cce8e957d8e7.tar.lz
nixlib-5be14c5c7459fe014d1a94511b01cce8e957d8e7.tar.xz
nixlib-5be14c5c7459fe014d1a94511b01cce8e957d8e7.tar.zst
nixlib-5be14c5c7459fe014d1a94511b01cce8e957d8e7.zip
libxml2: Remove crossAttrs
Diffstat (limited to 'pkgs/development/libraries/libxml2')
-rw-r--r--pkgs/development/libraries/libxml2/default.nix17
1 files changed, 5 insertions, 12 deletions
diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix
index b28f241d56ee..aa78d0d33c08 100644
--- a/pkgs/development/libraries/libxml2/default.nix
+++ b/pkgs/development/libraries/libxml2/default.nix
@@ -1,9 +1,10 @@
 { stdenv, lib, fetchurl
-, zlib, xz, python2, findXMLCatalogs, libiconv
+, zlib, xz, python2, findXMLCatalogs
 , buildPlatform, hostPlatform
 , pythonSupport ? buildPlatform == hostPlatform
 , icuSupport ? false, icu ? null
-, enableStatic ? false
+, enableShared ? hostPlatform.libc != "msvcrt"
+, enableStatic ? !enableShared,
 }:
 
 let
@@ -35,22 +36,14 @@ in stdenv.mkDerivation rec {
        lib.optional pythonSupport "--with-python=${python}"
     ++ lib.optional icuSupport    "--with-icu"
     ++ [ "--exec_prefix=$dev" ]
-    ++ lib.optional enableStatic "--enable-static";
+    ++ lib.optional enableStatic "--enable-static"
+    ++ lib.optional (!enableShared) "--disable-shared";
 
   enableParallelBuilding = true;
 
   doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin &&
     hostPlatform.libc != "musl";
 
-  crossAttrs = lib.optionalAttrs (hostPlatform.libc == "msvcrt") {
-    # creating the DLL is broken ATM
-    dontDisableStatic = true;
-    configureFlags = configureFlags ++ [ "--disable-shared" ];
-
-    # libiconv is a header dependency - propagating is enough
-    propagatedBuildInputs =  [ findXMLCatalogs libiconv ];
-  };
-
   preInstall = lib.optionalString pythonSupport
     ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
   installFlags = lib.optionalString pythonSupport