2012-09-18 17:14:22 +00:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
2013-10-15 14:14:08 +00:00
|
|
|
let version = "2013g"; in
|
2012-09-18 17:14:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "tzdata-${version}";
|
|
|
|
|
|
|
|
srcs =
|
|
|
|
[ (fetchurl {
|
|
|
|
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
|
2013-10-15 14:14:08 +00:00
|
|
|
sha256 = "0krsgncjnk64g3xshj5xd3znskcx9wwy20g1wmm2lwycincx7kdn";
|
2012-09-18 17:14:22 +00:00
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
|
2013-10-15 14:14:08 +00:00
|
|
|
sha256 = "0ysqm72xm9vcykqg9zgry69w6gr3i6b6mpbvgfmwyrdvb6s5ihy7";
|
2012-09-18 17:14:22 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2014-03-10 20:36:43 +00:00
|
|
|
outputs = [ "out" "lib" ];
|
2012-09-18 17:14:22 +00:00
|
|
|
|
2014-03-10 20:36:43 +00:00
|
|
|
makeFlags = "TOPDIR=$(out) TZDIR=$(out)/share/zoneinfo ETCDIR=$(TMPDIR)/etc LIBDIR=$(lib)/lib MANDIR=$(TMPDIR)/man AWK=awk";
|
2012-09-18 17:14:22 +00:00
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
mv $out/share/zoneinfo-posix $out/share/zoneinfo/posix
|
|
|
|
mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right
|
2014-03-10 20:36:43 +00:00
|
|
|
|
|
|
|
ensureDir "$lib/include"
|
|
|
|
cp tzfile.h "$lib/include/tzfile.h"
|
2012-09-18 17:14:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.iana.org/time-zones;
|
|
|
|
description = "Database of current and historical time zones";
|
|
|
|
};
|
|
|
|
}
|