46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ stdenv, fetchurl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "tzdata-${version}";
|
|
version = "2016c";
|
|
|
|
srcs =
|
|
[ (fetchurl {
|
|
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
|
|
sha256 = "0j1dk830rkr1pijfac5wkdifi47k28mmvfys6z07l07jws0xj047";
|
|
})
|
|
(fetchurl {
|
|
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
|
|
sha256 = "05m4ql1x3b4bmlg0vv1ibz2128mkk4xxnixagcmwlnwkhva1njrl";
|
|
})
|
|
];
|
|
|
|
sourceRoot = ".";
|
|
outputs = [ "out" "lib" ];
|
|
|
|
makeFlags = [
|
|
"TOPDIR=$(out)"
|
|
"TZDIR=$(out)/share/zoneinfo"
|
|
"ETCDIR=$(TMPDIR)/etc"
|
|
"LIBDIR=$(lib)/lib"
|
|
"MANDIR=$(TMPDIR)/man"
|
|
"AWK=awk"
|
|
"CFLAGS=-DHAVE_LINK=0"
|
|
];
|
|
|
|
postInstall =
|
|
''
|
|
rm $out/share/zoneinfo-posix
|
|
ln -s . $out/share/zoneinfo/posix
|
|
mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right
|
|
|
|
mkdir -p "$lib/include"
|
|
cp tzfile.h "$lib/include/tzfile.h"
|
|
'';
|
|
|
|
meta = {
|
|
homepage = http://www.iana.org/time-zones;
|
|
description = "Database of current and historical time zones";
|
|
platforms = stdenv.lib.platforms.all;
|
|
};
|
|
}
|