From da668f66c79bd031b7231e0bd1090ec2d48d87c4 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 28 Jun 2017 14:23:59 -0400 Subject: [PATCH] zlib: cc-wrapper can be relied on to export this env var --- pkgs/development/libraries/zlib/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index e6468771cd40..40334f0b4624 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { crossAttrs = { dontStrip = static; configurePlatforms = []; - } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { + } // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") { installFlags = [ "BINARY_PATH=$(out)/bin" "INCLUDE_PATH=$(dev)/include" @@ -68,14 +68,12 @@ stdenv.mkDerivation rec { ]; makeFlags = [ "-f" "win32/Makefile.gcc" - "PREFIX=${stdenv.cross.config}-" + "PREFIX=${stdenv.cc.prefix}" ] ++ stdenv.lib.optional (!static) "SHARED_MODE=1"; # Non-typical naming confuses libtool which then refuses to use zlib's DLL # in some cases, e.g. when compiling libpng. postInstall = postInstall + "ln -s zlib1.dll $out/bin/libz.dll"; - } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { - makeFlags = [ "RANLIB=${stdenv.cross.config}-ranlib" ]; }; passthru.version = version;