about summary refs log tree commit diff
path: root/pkgs/development/libraries/zlib
diff options
context:
space:
mode:
authorRoss MacLeod <rmm-github@z.odi.ac>2017-05-30 22:20:15 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-22 17:53:52 -0400
commitf63f96ae355281bf89ea08f5c5af3b939878df5f (patch)
tree1e664436fc7d193b00e9c06e928b006f437ee14d /pkgs/development/libraries/zlib
parent38b2bd2f2853da7021e0efe001e7ec0a313afe44 (diff)
downloadnixlib-f63f96ae355281bf89ea08f5c5af3b939878df5f.tar
nixlib-f63f96ae355281bf89ea08f5c5af3b939878df5f.tar.gz
nixlib-f63f96ae355281bf89ea08f5c5af3b939878df5f.tar.bz2
nixlib-f63f96ae355281bf89ea08f5c5af3b939878df5f.tar.lz
nixlib-f63f96ae355281bf89ea08f5c5af3b939878df5f.tar.xz
nixlib-f63f96ae355281bf89ea08f5c5af3b939878df5f.tar.zst
nixlib-f63f96ae355281bf89ea08f5c5af3b939878df5f.zip
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
Diffstat (limited to 'pkgs/development/libraries/zlib')
-rw-r--r--pkgs/development/libraries/zlib/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix
index dc6f0a455d86..e6468771cd40 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