From 401544bcacae7714c4969b2589e9f60ffd3ecddc Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Fri, 21 Oct 2022 22:40:27 +0200 Subject: zlib: cleanup --- pkgs/development/libraries/zlib/default.nix | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index a51fec31c14..7835a571c55 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -21,7 +21,7 @@ assert shared || static; assert splitStaticOutput -> static; -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { pname = "zlib"; version = "1.2.12"; @@ -57,6 +57,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 @@ -128,20 +134,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; -}) +} -- cgit 1.4.1