nixpkgs/pkgs/data/misc/tzdata/default.nix
aszlig 46e90f76c6
tzdata: Provide lib as an additional output.
We're already using tzcode inside tzdata, so let's make it available as
an output here. The reason we need it is in order to compile OpenCFLite.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:00:44 +01:00

38 lines
1 KiB
Nix

{ stdenv, fetchurl }:
let version = "2013g"; in
stdenv.mkDerivation rec {
name = "tzdata-${version}";
srcs =
[ (fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
sha256 = "0krsgncjnk64g3xshj5xd3znskcx9wwy20g1wmm2lwycincx7kdn";
})
(fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
sha256 = "0ysqm72xm9vcykqg9zgry69w6gr3i6b6mpbvgfmwyrdvb6s5ihy7";
})
];
sourceRoot = ".";
outputs = [ "out" "lib" ];
makeFlags = "TOPDIR=$(out) TZDIR=$(out)/share/zoneinfo ETCDIR=$(TMPDIR)/etc LIBDIR=$(lib)/lib MANDIR=$(TMPDIR)/man AWK=awk";
postInstall =
''
mv $out/share/zoneinfo-posix $out/share/zoneinfo/posix
mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right
ensureDir "$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";
};
}