From 2c58a641073e105b79d4a61ca0d21a571b00dc74 Mon Sep 17 00:00:00 2001 From: Ross MacLeod Date: Tue, 30 May 2017 22:20:15 -0400 Subject: [PATCH] zlib: don't really override CC at ay point but leave the preConfigure script as it was when not cross building in order to avoid hash breakage --- pkgs/development/libraries/zlib/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index dc6f0a455d862..e6468771cd40c 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -1,4 +1,8 @@ -{ stdenv, fetchurl, static ? false }: +{ stdenv +, fetchurl +, buildPlatform, hostPlatform +, static ? false +}: let version = "1.2.11"; in @@ -24,7 +28,9 @@ stdenv.mkDerivation rec { setOutputFlags = false; outputDoc = "dev"; # single tiny man3 page - preConfigure = '' + # TODO(@Dridus) CC set by cc-wrapper setup-hook, so just empty out the preConfigure script when cross building, but leave the old incorrect script when not + # cross building to avoid hash breakage. Once hash breakage is acceptable, remove preConfigure entirely. + preConfigure = stdenv.lib.optionalString (hostPlatform == buildPlatform) '' if test -n "$crossConfig"; then export CC=$crossConfig-gcc fi