tzdata: Fix cross-compilation
This commit is contained in:
parent
e51a76ce73
commit
942855c8bd
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl, buildPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "tzdata-${version}";
|
name = "tzdata-${version}";
|
||||||
|
@ -28,8 +28,23 @@ stdenv.mkDerivation rec {
|
||||||
"MANDIR=$(man)/share/man"
|
"MANDIR=$(man)/share/man"
|
||||||
"AWK=awk"
|
"AWK=awk"
|
||||||
"CFLAGS=-DHAVE_LINK=0"
|
"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 =
|
postInstall =
|
||||||
''
|
''
|
||||||
rm $out/share/zoneinfo-posix
|
rm $out/share/zoneinfo-posix
|
||||||
|
|
Loading…
Reference in New Issue