@@ -1,8 +1,11 @@
1−{ stdenv, lib, fetchurl, zlib, xz, python2, findXMLCatalogs, libiconv, fetchpatch
2−, pythonSupport ? (! stdenv ? cross) }:
1+{ stdenv, lib, fetchurl, fetchpatch
2+, zlib, xz, python2, findXMLCatalogs, libiconv
3+, pythonSupport ? (! stdenv ? cross)
4+, icuSupport ? false, icu ? null }:
35
46let
57 python = python2;
8+
69in stdenv.mkDerivation rec {
710 name = "libxml2-${version}";
811 version = "2.9.4";
@@ -37,9 +40,11 @@ in stdenv.mkDerivation rec {
3740 # RUNPATH for that, leading to undefined references for its users.
3841 ++ lib.optional stdenv.isFreeBSD xz;
3942
40− propagatedBuildInputs = [ zlib findXMLCatalogs ];
43+ propagatedBuildInputs = [ zlib findXMLCatalogs ] ++ lib.optional icuSupport icu;
4144
42− configureFlags = lib.optional pythonSupport "--with-python=${python}"
45+ configureFlags =
46+ lib.optional pythonSupport "--with-python=${python}"
47+ ++ lib.optional icuSupport "--with-icu"
4348 ++ [ "--exec_prefix=$dev" ];
4449
4550 enableParallelBuilding = true;