nixpkgs/pkgs/data/misc/tzdata/default.nix
2016-12-28 19:15:18 +01:00

48 lines
1.2 KiB
Nix

{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "tzdata-${version}";
version = "2016j";
srcs =
[ (fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
sha256 = "1j4xycpwhs57qnkcxwh3np8wnf3km69n3cf4w6p2yv2z247lxvpm";
})
(fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
sha256 = "1dxhrk4z0n2di8p0yd6q00pa6bwyz5xqbrfbasiz8785ni7zrvxr";
})
];
sourceRoot = ".";
outputs = [ "out" "man" "dev" ];
propagatedBuildOutputs = [];
makeFlags = [
"TOPDIR=$(out)"
"TZDIR=$(out)/share/zoneinfo"
"ETCDIR=$(TMPDIR)/etc"
"LIBDIR=$(dev)/lib"
"MANDIR=$(man)/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 "$dev/include"
cp tzfile.h "$dev/include/tzfile.h"
'';
meta = {
homepage = http://www.iana.org/time-zones;
description = "Database of current and historical time zones";
platforms = stdenv.lib.platforms.all;
};
}