diff --git a/pkgs/development/libraries/libxml2/2.7.4.nix b/pkgs/development/libraries/libxml2/2.7.4.nix new file mode 100644 index 00000000000..d126aa82581 --- /dev/null +++ b/pkgs/development/libraries/libxml2/2.7.4.nix @@ -0,0 +1,27 @@ +{stdenv, fetchurl, zlib, python ? null, pythonSupport ? true}: + +assert pythonSupport -> python != null; + +stdenv.mkDerivation { + name = "libxml2-2.7.4"; + + src = fetchurl { + url = ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.4.tar.gz; + sha256 = "1psk9r69z02cmjpbixs89qj0zprfyi6xc598j51cc0gah0h3wq03"; + }; + + configureFlags = '' + ${if pythonSupport then "--with-python=${python}" else ""} + ''; + + propagatedBuildInputs = [zlib]; + + setupHook = ./setup-hook.sh; + + passthru = {inherit pythonSupport;}; + + meta = { + homepage = http://xmlsoft.org/; + description = "A XML parsing library for C"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb10c8aa748..a197457d635 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3844,6 +3844,12 @@ let pythonSupport = false; }; + # !!! Merge later. + libxml2New = makeOverridable (import ../development/libraries/libxml2/2.7.4.nix) { + inherit fetchurl stdenv zlib python; + pythonSupport = false; + }; + libxml2Python = libxml2.override { pythonSupport = true; };