2012-09-18 18:14:22 +01:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
2015-10-01 17:58:32 +01:00
|
|
|
let version = "2015g"; in
|
2012-09-18 18:14:22 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "tzdata-${version}";
|
|
|
|
|
|
|
|
srcs =
|
|
|
|
[ (fetchurl {
|
|
|
|
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
|
2015-10-01 17:58:32 +01:00
|
|
|
sha256 = "0qb1awqrn3215zd2jikpqnmkzrxwfjf0d3dw2xmnk4c40yzws8xr";
|
2012-09-18 18:14:22 +01:00
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
|
2015-10-01 17:58:32 +01:00
|
|
|
sha256 = "1i3y1kzjiz2j62c7vd4wf85983sqk9x9lg3473njvbdz4kph5r0q";
|
2012-09-18 18:14:22 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2014-03-10 20:36:43 +00:00
|
|
|
outputs = [ "out" "lib" ];
|
2012-09-18 18:14:22 +01:00
|
|
|
|
2014-04-29 15:06:48 +01: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 18:14:22 +01:00
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
2014-04-29 14:57:31 +01:00
|
|
|
rm $out/share/zoneinfo-posix
|
|
|
|
ln -s . $out/share/zoneinfo/posix
|
2012-09-18 18:14:22 +01:00
|
|
|
mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right
|
2014-03-10 20:36:43 +00:00
|
|
|
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p "$lib/include"
|
2014-03-10 20:36:43 +00:00
|
|
|
cp tzfile.h "$lib/include/tzfile.h"
|
2012-09-18 18:14:22 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.iana.org/time-zones;
|
|
|
|
description = "Database of current and historical time zones";
|
2014-10-27 17:41:32 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2012-09-18 18:14:22 +01:00
|
|
|
};
|
|
|
|
}
|