2012-09-18 19:14:22 +02:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
2014-04-29 16:13:15 +02:00
|
|
|
let version = "2014b"; in
|
2012-09-18 19:14:22 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "tzdata-${version}";
|
|
|
|
|
|
|
|
srcs =
|
|
|
|
[ (fetchurl {
|
|
|
|
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
|
2014-04-29 16:13:15 +02:00
|
|
|
sha256 = "1d8w5g7fy8nrdj092cwmxdxw6rk3bzwpxqpz6l5sra2kqbhg7qfi";
|
2012-09-18 19:14:22 +02:00
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
|
2014-04-29 16:13:15 +02:00
|
|
|
sha256 = "12x7ahbjxc3sj4ykcvx5c7kw1nbn6ywm8wzq6303y3l8qyqd7nmm";
|
2012-09-18 19:14:22 +02:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2014-03-10 21:36:43 +01:00
|
|
|
outputs = [ "out" "lib" ];
|
2012-09-18 19:14:22 +02:00
|
|
|
|
2014-04-29 16:06:48 +02:00
|
|
|
makeFlags = "TOPDIR=$(out) TZDIR=$(out)/share/zoneinfo ETCDIR=$(TMPDIR)/etc LIBDIR=$(lib)/lib MANDIR=$(TMPDIR)/man AWK=awk CFLAGS=-DHAVE_LINK=0";
|
2012-09-18 19:14:22 +02:00
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
2014-04-29 15:57:31 +02:00
|
|
|
rm $out/share/zoneinfo-posix
|
|
|
|
ln -s . $out/share/zoneinfo/posix
|
2012-09-18 19:14:22 +02:00
|
|
|
mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right
|
2014-03-10 21:36:43 +01:00
|
|
|
|
|
|
|
ensureDir "$lib/include"
|
|
|
|
cp tzfile.h "$lib/include/tzfile.h"
|
2012-09-18 19:14:22 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.iana.org/time-zones;
|
|
|
|
description = "Database of current and historical time zones";
|
|
|
|
};
|
|
|
|
}
|