summary refs log tree commit diff
path: root/pkgs/development/libraries/libxml2
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-11-10 13:47:09 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2018-11-13 06:57:54 -0600
commit245f25586b590fe013c7fb579c228c382b806e0b (patch)
tree04559674412e8b8d752e6cb565a7e3e24f77a2ab /pkgs/development/libraries/libxml2
parentcb95a3c1d1b6cd9da65650be269436cbe9e265fa (diff)
downloadnixpkgs-245f25586b590fe013c7fb579c228c382b806e0b.tar
nixpkgs-245f25586b590fe013c7fb579c228c382b806e0b.tar.gz
nixpkgs-245f25586b590fe013c7fb579c228c382b806e0b.tar.bz2
nixpkgs-245f25586b590fe013c7fb579c228c382b806e0b.tar.lz
nixpkgs-245f25586b590fe013c7fb579c228c382b806e0b.tar.xz
nixpkgs-245f25586b590fe013c7fb579c228c382b806e0b.tar.zst
nixpkgs-245f25586b590fe013c7fb579c228c382b806e0b.zip
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)
Diffstat (limited to 'pkgs/development/libraries/libxml2')
-rw-r--r--pkgs/development/libraries/libxml2/default.nix4
1 files 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"
   '';