From c75a2bda2fced25c24213d13011813a4c0affb5e Mon Sep 17 00:00:00 2001 From: aleksana Date: Mon, 24 Feb 2025 21:22:17 +0800 Subject: [PATCH 1/2] libxml2: add zlib support option --- .../development/libraries/libxml2/default.nix | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index d95edee18c96..a2bb0499eea3 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -22,6 +22,8 @@ ), icuSupport ? false, icu, + zlibSupport ? false, + zlib, enableShared ? !stdenv.hostPlatform.isMinGW && !stdenv.hostPlatform.isStatic, enableStatic ? !enableShared, gnome, @@ -68,6 +70,9 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && pythonSupport && python ? isPy2 && python.isPy2) [ libintl + ] + ++ lib.optionals zlibSupport [ + zlib ]; propagatedBuildInputs = @@ -81,14 +86,18 @@ stdenv.mkDerivation (finalAttrs: { icu ]; - configureFlags = [ - "--exec-prefix=${placeholder "dev"}" - (lib.enableFeature enableStatic "static") - (lib.enableFeature enableShared "shared") - (lib.withFeature icuSupport "icu") - (lib.withFeature pythonSupport "python") - (lib.optionalString pythonSupport "PYTHON=${python.pythonOnBuildForHost.interpreter}") - ] ++ lib.optional enableHttp "--with-http"; + configureFlags = + [ + "--exec-prefix=${placeholder "dev"}" + (lib.enableFeature enableStatic "static") + (lib.enableFeature enableShared "shared") + (lib.withFeature icuSupport "icu") + (lib.withFeature pythonSupport "python") + (lib.optionalString pythonSupport "PYTHON=${python.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}\"" From b7a8a56b87cc16a6c9f1ac61031393db5879dfe7 Mon Sep 17 00:00:00 2001 From: aleksana Date: Mon, 24 Feb 2025 21:38:21 +0800 Subject: [PATCH 2/2] dia: enable zlib in libxml2 to support gzipped archives --- pkgs/by-name/di/dia/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/di/dia/package.nix b/pkgs/by-name/di/dia/package.nix index 6331ed8b496b..fbb11047880d 100644 --- a/pkgs/by-name/di/dia/package.nix +++ b/pkgs/by-name/di/dia/package.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation { [ graphene gtk3 - libxml2 + (libxml2.override { zlibSupport = true; }) python3 poppler ]