summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2022-10-21 22:40:27 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2022-10-21 22:40:49 +0200
commit401544bcacae7714c4969b2589e9f60ffd3ecddc (patch)
tree27da4c04d507206f3d9fba927da80e4ecf535477
parentdd2351ee2f2671d2f2216dd843e4997060eb9576 (diff)
downloadnixpkgs-401544bcacae7714c4969b2589e9f60ffd3ecddc.tar
nixpkgs-401544bcacae7714c4969b2589e9f60ffd3ecddc.tar.gz
nixpkgs-401544bcacae7714c4969b2589e9f60ffd3ecddc.tar.bz2
nixpkgs-401544bcacae7714c4969b2589e9f60ffd3ecddc.tar.lz
nixpkgs-401544bcacae7714c4969b2589e9f60ffd3ecddc.tar.xz
nixpkgs-401544bcacae7714c4969b2589e9f60ffd3ecddc.tar.zst
nixpkgs-401544bcacae7714c4969b2589e9f60ffd3ecddc.zip
zlib: cleanup
-rw-r--r--pkgs/development/libraries/zlib/default.nix20
1 files 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;
-})
+}