diff --git a/pkgs/development/libraries/libxml2/common.nix b/pkgs/development/libraries/libxml2/common.nix index f222324778c0..bc10a31bcf6d 100644 --- a/pkgs/development/libraries/libxml2/common.nix +++ b/pkgs/development/libraries/libxml2/common.nix @@ -2,7 +2,6 @@ stdenv, darwin, lib, - fetchFromGitLab, pkg-config, autoreconfHook, python3, @@ -28,6 +27,10 @@ gnome, testers, enableHttp ? false, + + version, + src, + extraMeta ? { }, }: let @@ -36,8 +39,12 @@ let stdenv' = if stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else stdenv; in stdenv'.mkDerivation (finalAttrs: { + inherit + version + src + ; + pname = "libxml2"; - version = "2.14.5"; outputs = [ @@ -50,14 +57,6 @@ stdenv'.mkDerivation (finalAttrs: { ++ lib.optional (enableStatic && enableShared) "static"; outputMan = "bin"; - src = fetchFromGitLab { - domain = "gitlab.gnome.org"; - owner = "GNOME"; - repo = "libxml2"; - tag = "v${finalAttrs.version}"; - hash = "sha256-vxKlw8Kz+fgUP6bhWG2+4346WJVzqG0QvPG/BT7RftQ="; - }; - patches = [ # Unmerged ABI-breaking patch required to fix the following security issues: # - https://gitlab.gnome.org/GNOME/libxslt/-/issues/139 @@ -159,9 +158,6 @@ stdenv'.mkDerivation (finalAttrs: { description = "XML parsing library for C"; license = lib.licenses.mit; platforms = lib.platforms.all; - maintainers = with lib.maintainers; [ - jtojnar - ]; pkgConfigModules = [ "libxml-2.0" ]; - }; + } // extraMeta; }) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix new file mode 100644 index 000000000000..9678d1124b02 --- /dev/null +++ b/pkgs/development/libraries/libxml2/default.nix @@ -0,0 +1,26 @@ +{ + lib, + callPackage, + fetchFromGitLab, +}: + +let + packages = { + libxml2 = callPackage ./common.nix { + version = "2.14.5"; + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "GNOME"; + repo = "libxml2"; + tag = "v${packages.libxml2.version}"; + hash = "sha256-vxKlw8Kz+fgUP6bhWG2+4346WJVzqG0QvPG/BT7RftQ="; + }; + extraMeta = { + maintainers = with lib.maintainers; [ + jtojnar + ]; + }; + }; + }; +in +packages diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ae6fa6207985..d191c2df337f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8835,7 +8835,10 @@ with pkgs; libxcrypt-legacy = libxcrypt.override { enableHashes = "all"; }; libxkbcommon = libxkbcommon_8; - libxml2 = callPackage ../development/libraries/libxml2/common.nix { }; + + inherit (callPackage ../development/libraries/libxml2 { }) + libxml2 + ; libxml2Python = let