diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index ada2ed997da..6c8fd6229a3 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, buildPackages }: stdenv.mkDerivation rec { name = "tzdata-${version}"; @@ -28,8 +28,23 @@ stdenv.mkDerivation rec { "MANDIR=$(man)/share/man" "AWK=awk" "CFLAGS=-DHAVE_LINK=0" + "cc=${stdenv.cc.targetPrefix}cc" + "AR=${stdenv.cc.targetPrefix}ar" ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + + installFlags = [ "ZIC=./zic-native" ]; + + preInstall = '' + mv zic.o zic.o.orig + mv zic zic.orig + make $makeFlags cc=cc AR=ar zic + mv zic zic-native + mv zic.o.orig zic.o + mv zic.orig zic + ''; + postInstall = '' rm $out/share/zoneinfo-posix