From 245f25586b590fe013c7fb579c228c382b806e0b Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 10 Nov 2018 13:47:09 -0600 Subject: [PATCH] libxml2: only use static output with both shared & static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- pkgs/development/libraries/libxml2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 36606999f53..54ed569f666 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/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" '';