libxml2: only use static output with both shared & static

The static output should only get created when both enableShared and
enableStatic are set. Otherwise there would be libraries missing from
the main output when enableShared = false & enableStatic = true. This
can cause issues in some packages that don’t know about libxml2’s
static output.

(cherry picked from commit 2bd6bb0a4bf21005d8877c735709cd21d22e05bd)
(cherry picked from commit 1421a39c1e62584d346185ad49484b11b7703dc1)
wip/yesman
Matthew Bauer 6 years ago
parent cb95a3c1d1
commit 245f25586b
  1. 4
      pkgs/development/libraries/libxml2/default.nix

@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "man" "doc" ]
++ lib.optional pythonSupport "py"
++ lib.optional enableStatic "static";
++ lib.optional (enableStatic && enableShared) "static";
propagatedBuildOutputs = "out bin" + lib.optionalString pythonSupport " py";
buildInputs = lib.optional pythonSupport python
@ -67,7 +67,7 @@ in stdenv.mkDerivation rec {
moveToOutput bin/xml2-config "$dev"
moveToOutput lib/xml2Conf.sh "$dev"
moveToOutput share/man/man1 "$bin"
'' + lib.optionalString enableStatic ''
'' + lib.optionalString (enableStatic && enableShared) ''
moveToOutput lib/libxml2.a "$static"
'';

Loading…
Cancel
Save