Merge #197116: zlib: cleanup

...into staging
This commit is contained in:
Vladimír Čunát 2022-10-28 10:55:53 +02:00
commit 40192db220
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -21,7 +21,7 @@ assert shared || static;
assert splitStaticOutput -> static;
stdenv.mkDerivation (rec {
stdenv.mkDerivation rec {
pname = "zlib";
version = "1.2.13";
@ -48,6 +48,12 @@ stdenv.mkDerivation (rec {
setOutputFlags = false;
outputDoc = "dev"; # single tiny man3 page
dontConfigure = stdenv.hostPlatform.libc == "msvcrt";
preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
export CHOST=${stdenv.hostPlatform.config}
'';
# For zlib's ./configure (as of verion 1.2.11), the order
# of --static/--shared flags matters!
# `--shared --static` builds only static libs, while
@ -119,20 +125,10 @@ stdenv.mkDerivation (rec {
"SHARED_MODE=1"
];
passthru = {
inherit version;
};
meta = with lib; {
homepage = "https://zlib.net";
description = "Lossless data-compression library";
license = licenses.zlib;
platforms = platforms.all;
};
} // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
preConfigure = ''
export CHOST=${stdenv.hostPlatform.config}
'';
} // lib.optionalAttrs (stdenv.hostPlatform.libc == "msvcrt") {
dontConfigure = true;
})
}