nixpkgs-suyu/pkgs/data/misc/tzdata/default.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "tzdata-${version}";
2016-12-28 19:08:17 +01:00
version = "2016j";
srcs =
[ (fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
2016-12-28 19:08:17 +01:00
sha256 = "1j4xycpwhs57qnkcxwh3np8wnf3km69n3cf4w6p2yv2z247lxvpm";
})
(fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
2016-12-28 19:08:17 +01:00
sha256 = "1dxhrk4z0n2di8p0yd6q00pa6bwyz5xqbrfbasiz8785ni7zrvxr";
})
];
sourceRoot = ".";
outputs = [ "out" "man" "dev" ];
propagatedBuildOutputs = [];
2016-03-16 05:41:47 +01:00
makeFlags = [
"TOPDIR=$(out)"
"TZDIR=$(out)/share/zoneinfo"
"ETCDIR=$(TMPDIR)/etc"
"LIBDIR=$(dev)/lib"
2017-07-11 13:06:49 +02:00
"MANDIR=$(man)/share/man"
2016-03-16 05:41:47 +01:00
"AWK=awk"
"CFLAGS=-DHAVE_LINK=0"
];
postInstall =
''
2014-04-29 15:57:31 +02:00
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;
};
}