diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-08-14 13:45:54 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-08-14 13:45:54 +0200 |
commit | 8d56f2472e47a3f1f388b69c0ecc24421910d555 (patch) | |
tree | 6eabee7471ed3f7395156dc158a58205cca236f4 /pkgs/development/libraries/zlib/default.nix | |
parent | 9bd78cb0488040ea996b27e82135396a45325af5 (diff) | |
parent | 930659b10bc7c875fd49b1cdae21a631b429c25a (diff) | |
download | nixpkgs-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar nixpkgs-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.gz nixpkgs-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.bz2 nixpkgs-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.lz nixpkgs-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.xz nixpkgs-8d56f2472e47a3f1f388b69c0ecc24421910d555.tar.zst nixpkgs-8d56f2472e47a3f1f388b69c0ecc24421910d555.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/development/libraries/zlib/default.nix')
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 7fb5be1c343..9f5af47c726 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -1,5 +1,20 @@ { stdenv , fetchurl +# Regarding static/shared libaries, the current behaviour is: +# +# - static=true, shared=true: builds both and moves .a to the .static output; +# in this case `pkg-config` auto detection will +# not work if the .static output is given as +# buildInputs to another package (#66461) +# - static=true, shared=false: builds .a only and leaves it in the main output +# - static=false, shared=true: builds shared only +# +# To get both `.a` and shared libraries in one output, +# you currently have to use +# static=false, shared=true +# and use +# .overrideAttrs (old: { dontDisableStatic = true; }) +# This is because by default, upstream zlib ./configure builds both. , static ? true , shared ? true }: @@ -68,6 +83,8 @@ stdenv.mkDerivation (rec { ] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ "-f" "win32/Makefile.gcc" ] ++ stdenv.lib.optionals shared [ + # Note that as of writing (zlib 1.2.11), this flag only has an effect + # for Windows as it is specific to `win32/Makefile.gcc`. "SHARED_MODE=1" ]; |