tzdata: Fix cross-compilation
This commit is contained in:
parent
e51a76ce73
commit
942855c8bd
1 changed files with 16 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue