From 1c93ab362bc9c2a9275d7d2dd0a6268be86e495a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 18 Aug 2022 00:47:23 +0000 Subject: [PATCH] =?UTF-8?q?libxml2:=202.9.14=20=E2=86=92=202.10.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Massive cleanups - CVE-2022-2309 - More security fixes - Removal of outdated development manpage libxml.3 https://gitlab.gnome.org/GNOME/libxml2/-/compare/v2.9.14...v2.10.0 - Python detection is broken by `strictDeps` for unknown reasons. - Also replaced `moveToOutput` with more declarative `outputMan`. --- .../development/libraries/libxml2/default.nix | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index c4571feb81ef..474afc4ba6ca 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, fetchpatch , zlib , pkg-config , autoreconfHook @@ -21,15 +22,16 @@ stdenv.mkDerivation rec { pname = "libxml2"; - version = "2.9.14"; + version = "2.10.0"; - outputs = [ "bin" "dev" "out" "man" "doc" ] + outputs = [ "bin" "dev" "out" "doc" ] ++ lib.optional pythonSupport "py" ++ lib.optional (enableStatic && enableShared) "static"; + outputMan = "bin"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0"; + sha256 = "LdMxEOp3hnbeFL6kmZ7hFzxMpV1f8UUryiJOBvAVJZU="; }; patches = [ @@ -45,9 +47,18 @@ stdenv.mkDerivation rec { # https://github.com/NixOS/nixpkgs/pull/63174 # https://github.com/NixOS/nixpkgs/pull/72342 ./utf8-xmlErrorFuncHandler.patch - ]; - strictDeps = true; + # Fix PostgreSQL tests + # https://gitlab.gnome.org/GNOME/libxml2/-/issues/397 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/libxml2/-/commit/4ad71c2d72beef0d10cf75aa417db10d77846f75.patch"; + sha256 = "gubGDhBhHNYdEty+sFQFd3pSWB9isN5AjD//ksujGQk="; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/libxml2/-/commit/5b2d07a72670513e41b481a9d922c983a64027ca.patch"; + sha256 = "7jYvMW6bgImXubbaWpQhrIw3xBBnaNn+iJt3EQiW3yU="; + }) + ]; nativeBuildInputs = [ pkg-config @@ -88,6 +99,7 @@ stdenv.mkDerivation rec { installFlags = lib.optionals pythonSupport [ "pythondir=\"${placeholder "py"}/${python.sitePackages}\"" + "pyexecdir=\"${placeholder "py"}/${python.sitePackages}\"" ]; enableParallelBuilding = true; @@ -110,7 +122,6 @@ stdenv.mkDerivation rec { postFixup = '' moveToOutput bin/xml2-config "$dev" moveToOutput lib/xml2Conf.sh "$dev" - moveToOutput share/man/man1 "$bin" '' + lib.optionalString (enableStatic && enableShared) '' moveToOutput lib/libxml2.a "$static" '';