properly inject tzdata
This commit is contained in:
parent
11b375657d
commit
1187ef5fe3
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
hello*
|
hello*
|
||||||
tmp
|
tmp
|
||||||
|
result*
|
||||||
|
|
17
pkgs/001-tzdata.patch
Normal file
17
pkgs/001-tzdata.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/time/chrono/+darwin.ha b/time/chrono/+darwin.ha
|
||||||
|
--- a/time/chrono/+darwin.ha
|
||||||
|
+++ b/time/chrono/+darwin.ha
|
||||||
|
@@ -2,11 +2,11 @@
|
||||||
|
// (c) Hare authors <https://harelang.org>
|
||||||
|
|
||||||
|
def LOCALTIME_PATH: str = "/etc/localtime";
|
||||||
|
-def TZDB_PATH: str = "/usr/share/zoneinfo/";
|
||||||
|
+def TZDB_PATH: str = "@tzdata@/share/zoneinfo/";
|
||||||
|
|
||||||
|
// The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI
|
||||||
|
// leap second data.
|
||||||
|
// export def UTC_LEAPSECS_FILE: str = "/usr/share/zoneinfo/leapseconds";
|
||||||
|
// Download the file from ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list,
|
||||||
|
// and move it to this location.
|
||||||
|
-export def UTC_LEAPSECS_PATH: str = "/var/db/ntpd.leap-seconds.list";
|
||||||
|
+export def UTC_LEAPSECS_PATH: str = "@tzdata@/share/zoneinfo/leap-seconds.list";
|
|
@ -7,6 +7,7 @@
|
||||||
harec,
|
harec,
|
||||||
tzdata,
|
tzdata,
|
||||||
python3,
|
python3,
|
||||||
|
substituteAll,
|
||||||
hareAs,
|
hareAs,
|
||||||
hareCc,
|
hareCc,
|
||||||
hareLd,
|
hareLd,
|
||||||
|
@ -28,6 +29,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
};
|
};
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(substituteAll {
|
||||||
|
src = ./001-tzdata.patch;
|
||||||
|
inherit tzdata;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
harec
|
harec
|
||||||
makeWrapper
|
makeWrapper
|
||||||
|
|
Loading…
Reference in a new issue