diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-07-23 15:37:08 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-07-24 18:36:59 -0400 |
commit | 5be14c5c7459fe014d1a94511b01cce8e957d8e7 (patch) | |
tree | 3032b18926f74422bde5814c1f3b147f1dfa10df /pkgs/development/libraries/libxml2 | |
parent | d4f5ee8199cedb03b1a81379e2019a29484d3625 (diff) |
libxml2: Remove crossAttrs
Diffstat (limited to 'pkgs/development/libraries/libxml2')
-rw-r--r-- | pkgs/development/libraries/libxml2/default.nix | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index b28f241d56ee4..aa78d0d33c08a 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 |