1{ stdenv, fetchurl }:
2
3let version = "2015f"; in
4
5stdenv.mkDerivation rec {
6 name = "tzdata-${version}";
7
8 srcs =
9 [ (fetchurl {
10 url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
11 sha256 = "07ak8ai5skgjpj6lg74pawxg0bz998k7s2ah7jqyqhp086sq37wm";
12 })
13 (fetchurl {
14 url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
15 sha256 = "1bl4vqw6yp9199clm9aai566bmslp42g5xglj3vl24dn5fjf158c";
16 })
17 ];
18
19 sourceRoot = ".";
20 outputs = [ "out" "lib" ];
21
22 makeFlags = "TOPDIR=$(out) TZDIR=$(out)/share/zoneinfo ETCDIR=$(TMPDIR)/etc LIBDIR=$(lib)/lib MANDIR=$(TMPDIR)/man AWK=awk CFLAGS=-DHAVE_LINK=0";
23
24 postInstall =
25 ''
26 rm $out/share/zoneinfo-posix
27 ln -s . $out/share/zoneinfo/posix
28 mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right
29
30 mkdir -p "$lib/include"
31 cp tzfile.h "$lib/include/tzfile.h"
32 '';
33
34 meta = {
35 homepage = http://www.iana.org/time-zones;
36 description = "Database of current and historical time zones";
37 platforms = stdenv.lib.platforms.all;
38 };
39}