Skip to content

Commit c75a2bd

Browse files
committed
libxml2: add zlib support option
1 parent d05074f commit c75a2bd

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

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)