diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-08-14 00:20:49 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-08-14 00:23:16 +0000 |
commit | 4999a38db7c5de0ea9f514a12ecd4133cce647f3 (patch) | |
tree | bbb659ab07fda4c9b98053499b7e3f046ac6d5dc /nixpkgs/pkgs/development/libraries/zlib | |
parent | f9abd30e11337cf07034f2cc8ad1691aa4a69386 (diff) | |
parent | 8746c77a383f5c76153c7a181f3616d273acfa2a (diff) | |
download | nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.gz nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.bz2 nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.lz nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.xz nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.zst nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.zip |
Merge commit '8746c77a383f5c76153c7a181f3616d273acfa2a'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/zlib')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/zlib/default.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/zlib/default.nix b/nixpkgs/pkgs/development/libraries/zlib/default.nix index 7fb5be1c3434..9f5af47c7268 100644 --- a/nixpkgs/pkgs/development/libraries/zlib/default.nix +++ b/nixpkgs/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" ]; |