Skip to content

Commit 3635cd6

Browse files
authored
libxml2: add zlib support option (#384768)
2 parents 5543743 + b7a8a56 commit 3635cd6

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

pkgs/by-name/di/dia/package.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ stdenv.mkDerivation {
4444
[
4545
graphene
4646
gtk3
47-
libxml2
47+
(libxml2.override { zlibSupport = true; })
4848
python3
4949
poppler
5050
]

pkgs/development/libraries/libxml2/default.nix

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
),
2323
icuSupport ? false,
2424
icu,
25+
zlibSupport ? false,
26+
zlib,
2527
enableShared ? !stdenv.hostPlatform.isMinGW && !stdenv.hostPlatform.isStatic,
2628
enableStatic ? !enableShared,
2729
gnome,
@@ -68,6 +70,9 @@ stdenv.mkDerivation (finalAttrs: {
6870
]
6971
++ lib.optionals (stdenv.hostPlatform.isDarwin && pythonSupport && python ? isPy2 && python.isPy2) [
7072
libintl
73+
]
74+
++ lib.optionals zlibSupport [
75+
zlib
7176
];
7277

7378
propagatedBuildInputs =
@@ -81,14 +86,18 @@ stdenv.mkDerivation (finalAttrs: {
8186
icu
8287
];
8388

84-
configureFlags = [
85-
"--exec-prefix=${placeholder "dev"}"
86-
(lib.enableFeature enableStatic "static")
87-
(lib.enableFeature enableShared "shared")
88-
(lib.withFeature icuSupport "icu")
89-
(lib.withFeature pythonSupport "python")
90-
(lib.optionalString pythonSupport "PYTHON=${python.pythonOnBuildForHost.interpreter}")
91-
] ++ lib.optional enableHttp "--with-http";
89+
configureFlags =
90+
[
91+
"--exec-prefix=${placeholder "dev"}"
92+
(lib.enableFeature enableStatic "static")
93+
(lib.enableFeature enableShared "shared")
94+
(lib.withFeature icuSupport "icu")
95+
(lib.withFeature pythonSupport "python")
96+
(lib.optionalString pythonSupport "PYTHON=${python.pythonOnBuildForHost.interpreter}")
97+
]
98+
# avoid rebuilds, can be merged into list in version bumps
99+
++ lib.optional enableHttp "--with-http"
100+
++ lib.optional zlibSupport "--with-zlib";
92101

93102
installFlags = lib.optionals pythonSupport [
94103
"pythondir=\"${placeholder "py"}/${python.sitePackages}\""

0 commit comments

Comments
 (0)