@@ -1,4 +1,8 @@
1−{ stdenv, fetchurl, static ? false }:
1+{ stdenv
2+, fetchurl
3+, buildPlatform, hostPlatform
4+, static ? false
5+}:
26
37let version = "1.2.11"; in
48
@@ -24,7 +28,9 @@ stdenv.mkDerivation rec {
2428 setOutputFlags = false;
2529 outputDoc = "dev"; # single tiny man3 page
2630
27− preConfigure = ''
31+ # 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
32+ # cross building to avoid hash breakage. Once hash breakage is acceptable, remove preConfigure entirely.
33+ preConfigure = stdenv.lib.optionalString (hostPlatform == buildPlatform) ''
2834 if test -n "$crossConfig"; then
2935 export CC=$crossConfig-gcc
3036 fi