From 2fc398994878e1de9e4fb02e0a19011503f3876d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sun, 13 Jul 2025 21:14:10 +0200 Subject: [PATCH] libxml2: remove python2 support, don't check for python3 --- .../development/libraries/libxml2/default.nix | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 431e08fa101b..f222324778c0 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -5,9 +5,7 @@ fetchFromGitLab, pkg-config, autoreconfHook, - libintl, python3, - gettext, ncurses, findXMLCatalogs, libiconv, @@ -33,7 +31,6 @@ }: let - python = python3; # libxml2 is a dependency of xcbuild. Avoid an infinite recursion by using a bootstrap stdenv # that does not propagate xcrun. stdenv' = if stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else stdenv; @@ -79,16 +76,8 @@ stdenv'.mkDerivation (finalAttrs: { buildInputs = lib.optionals pythonSupport [ - python - ] - ++ lib.optionals (pythonSupport && python ? isPy2 && python.isPy2) [ - gettext - ] - ++ lib.optionals (pythonSupport && python ? isPy3 && python.isPy3) [ ncurses - ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin && pythonSupport && python ? isPy2 && python.isPy2) [ - libintl + python3 ] ++ lib.optionals zlibSupport [ zlib @@ -112,15 +101,15 @@ stdenv'.mkDerivation (finalAttrs: { (lib.enableFeature enableShared "shared") (lib.withFeature icuSupport "icu") (lib.withFeature pythonSupport "python") - (lib.optionalString pythonSupport "PYTHON=${python.pythonOnBuildForHost.interpreter}") + (lib.optionalString pythonSupport "PYTHON=${python3.pythonOnBuildForHost.interpreter}") ] # avoid rebuilds, can be merged into list in version bumps ++ lib.optional enableHttp "--with-http" ++ lib.optional zlibSupport "--with-zlib"; installFlags = lib.optionals pythonSupport [ - "pythondir=\"${placeholder "py"}/${python.sitePackages}\"" - "pyexecdir=\"${placeholder "py"}/${python.sitePackages}\"" + "pythondir=\"${placeholder "py"}/${python3.sitePackages}\"" + "pyexecdir=\"${placeholder "py"}/${python3.sitePackages}\"" ]; enableParallelBuilding = true; @@ -135,7 +124,7 @@ stdenv'.mkDerivation (finalAttrs: { ''; preInstall = lib.optionalString pythonSupport '' - substituteInPlace python/libxml2mod.la --replace-fail "$dev/${python.sitePackages}" "$py/${python.sitePackages}" + substituteInPlace python/libxml2mod.la --replace-fail "$dev/${python3.sitePackages}" "$py/${python3.sitePackages}" ''; postFixup =