libxml2: Remove crossAttrs
This commit is contained in:
parent
d4f5ee8199
commit
5be14c5c74
@ -1,9 +1,10 @@
|
|||||||
{ stdenv, lib, fetchurl
|
{ stdenv, lib, fetchurl
|
||||||
, zlib, xz, python2, findXMLCatalogs, libiconv
|
, zlib, xz, python2, findXMLCatalogs
|
||||||
, buildPlatform, hostPlatform
|
, buildPlatform, hostPlatform
|
||||||
, pythonSupport ? buildPlatform == hostPlatform
|
, pythonSupport ? buildPlatform == hostPlatform
|
||||||
, icuSupport ? false, icu ? null
|
, icuSupport ? false, icu ? null
|
||||||
, enableStatic ? false
|
, enableShared ? hostPlatform.libc != "msvcrt"
|
||||||
|
, enableStatic ? !enableShared,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -35,22 +36,14 @@ in stdenv.mkDerivation rec {
|
|||||||
lib.optional pythonSupport "--with-python=${python}"
|
lib.optional pythonSupport "--with-python=${python}"
|
||||||
++ lib.optional icuSupport "--with-icu"
|
++ lib.optional icuSupport "--with-icu"
|
||||||
++ [ "--exec_prefix=$dev" ]
|
++ [ "--exec_prefix=$dev" ]
|
||||||
++ lib.optional enableStatic "--enable-static";
|
++ lib.optional enableStatic "--enable-static"
|
||||||
|
++ lib.optional (!enableShared) "--disable-shared";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin &&
|
doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin &&
|
||||||
hostPlatform.libc != "musl";
|
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
|
preInstall = lib.optionalString pythonSupport
|
||||||
''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
|
''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
|
||||||
installFlags = lib.optionalString pythonSupport
|
installFlags = lib.optionalString pythonSupport
|
||||||
|
Loading…
x
Reference in New Issue
Block a user