nixpkgs/pkgs/data/misc/tzdata/default.nix
Tobias Geerinckx-Rice 4679104133 tzdata 2015a -> 2015c
2015-04-17 00:46:20 +02:00

39 lines
1.1 KiB
Nix

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