3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/data/misc/tzdata/default.nix
2014-10-27 18:41:42 +01:00

40 lines
1.1 KiB
Nix

{ stdenv, fetchurl }:
let version = "2014i"; in
stdenv.mkDerivation rec {
name = "tzdata-${version}";
srcs =
[ (fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
sha256 = "0lv1i3ikibf9yn1l3hcy00x5ghwxn87k1myyp1cyr55psayk3wra";
})
(fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
sha256 = "10s7x24lh2vm3magl7dq2xs9pw47hhyaq6xpi6c4aiqdzdsi0nb2";
})
];
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;
};
}