Merge pull request #325334 from onemoresuza/hare-0.24.2
hare: 0.24.0 -> 0.24.2
This commit is contained in:
@@ -1,28 +1,45 @@
|
||||
diff --git a/time/chrono/+freebsd.ha b/time/chrono/+freebsd.ha
|
||||
index 26d78ab1..6861bfe8 100644
|
||||
index af49080e..3dde7963 100644
|
||||
--- a/time/chrono/+freebsd.ha
|
||||
+++ b/time/chrono/+freebsd.ha
|
||||
@@ -2,7 +2,7 @@
|
||||
@@ -2,8 +2,8 @@
|
||||
// (c) Hare authors <https://harelang.org>
|
||||
|
||||
|
||||
def LOCALTIME_PATH: str = "/etc/localtime";
|
||||
-def ZONEINFO_PREFIX: str = "/usr/share/zoneinfo/";
|
||||
+def ZONEINFO_PREFIX: str = "@tzdata@/share/zoneinfo/";
|
||||
|
||||
-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_PATH: str = "/var/db/ntpd.leap-seconds.list";
|
||||
+export def UTC_LEAPSECS_PATH: str = "@tzdata@/share/zoneinfo/leap-seconds.list";
|
||||
diff --git a/time/chrono/+linux.ha b/time/chrono/+linux.ha
|
||||
index 600f606c..8d5617e2 100644
|
||||
index 2756fd6f..1ea22385 100644
|
||||
--- a/time/chrono/+linux.ha
|
||||
+++ b/time/chrono/+linux.ha
|
||||
@@ -2,8 +2,8 @@
|
||||
// (c) Hare authors <https://harelang.org>
|
||||
|
||||
|
||||
def LOCALTIME_PATH: str = "/etc/localtime";
|
||||
-def ZONEINFO_PREFIX: str = "/usr/share/zoneinfo/";
|
||||
+def ZONEINFO_PREFIX: str = "@tzdata@/share/zoneinfo/";
|
||||
|
||||
-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/leap-seconds.list";
|
||||
+export def UTC_LEAPSECS_FILE: str = "@tzdata@/share/zoneinfo/leap-seconds.list";
|
||||
-export def UTC_LEAPSECS_PATH: str = "/usr/share/zoneinfo/leap-seconds.list";
|
||||
+export def UTC_LEAPSECS_PATH: str = "@tzdata@/share/zoneinfo/leap-seconds.list";
|
||||
diff --git a/time/chrono/+openbsd.ha b/time/chrono/+openbsd.ha
|
||||
index 2756fd6f..1ea22385 100644
|
||||
--- a/time/chrono/+openbsd.ha
|
||||
+++ b/time/chrono/+openbsd.ha
|
||||
@@ -2,8 +2,8 @@
|
||||
// (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_PATH: str = "/usr/share/zoneinfo/leap-seconds.list";
|
||||
+export def UTC_LEAPSECS_PATH: str = "@tzdata@/share/zoneinfo/leap-seconds.list";
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
|
||||
index b2ac6518..417b46c6 100644
|
||||
index ce19af9e..8631b325 100644
|
||||
--- a/cmd/hare/build.ha
|
||||
+++ b/cmd/hare/build.ha
|
||||
@@ -37,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
|
||||
@@ -36,7 +36,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
|
||||
case let ncpu: size =>
|
||||
yield ncpu;
|
||||
},
|
||||
- version = build::get_version(os::tryenv("HAREC", "harec"))?,
|
||||
+ version = build::get_version(os::tryenv("HAREC", "@harec@"))?,
|
||||
arch = arch.qbe_name,
|
||||
+ version = build::get_version(os::tryenv("HAREC", "@harec_bin@"))?,
|
||||
arch = arch,
|
||||
platform = build::get_platform(os::sysname())?,
|
||||
...
|
||||
@@ -145,8 +145,8 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
|
||||
@@ -143,8 +143,8 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
|
||||
set_arch_tags(&ctx.ctx.tags, arch);
|
||||
|
||||
ctx.cmds = ["",
|
||||
- os::tryenv("HAREC", "harec"),
|
||||
- os::tryenv("QBE", "qbe"),
|
||||
+ os::tryenv("HAREC", "@harec@"),
|
||||
+ os::tryenv("QBE", "@qbe@"),
|
||||
+ os::tryenv("HAREC", "@harec_bin@"),
|
||||
+ os::tryenv("QBE", "@qbe_bin@"),
|
||||
os::tryenv("AS", arch.as_cmd),
|
||||
os::tryenv("LD", arch.ld_cmd),
|
||||
];
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/mime/system.ha b/mime/system.ha
|
||||
index 73ff3496..42e7b640 100644
|
||||
--- a/mime/system.ha
|
||||
+++ b/mime/system.ha
|
||||
@@ -11,7 +11,7 @@ use strings;
|
||||
use types;
|
||||
|
||||
// Path to the system MIME database.
|
||||
-export def SYSTEM_DB: str = "/etc/mime.types";
|
||||
+export def SYSTEM_DB: str = "@mailcap@/etc/mime.types";
|
||||
|
||||
@init fn init() void = {
|
||||
// Done in a separate function so we can discard errors here
|
||||
@@ -0,0 +1,30 @@
|
||||
diff --git a/mime/+freebsd.ha b/mime/+freebsd.ha
|
||||
index e536d9bd..022f18c4 100644
|
||||
--- a/mime/+freebsd.ha
|
||||
+++ b/mime/+freebsd.ha
|
||||
@@ -2,4 +2,4 @@
|
||||
// (c) Hare authors <https://harelang.org>
|
||||
|
||||
// Path to the system MIME database.
|
||||
-export def SYSTEM_DB: str = "/etc/mime.types";
|
||||
+export def SYSTEM_DB: str = "@mailcap@/etc/mime.types";
|
||||
diff --git a/mime/+linux.ha b/mime/+linux.ha
|
||||
index e536d9bd..022f18c4 100644
|
||||
--- a/mime/+linux.ha
|
||||
+++ b/mime/+linux.ha
|
||||
@@ -2,4 +2,4 @@
|
||||
// (c) Hare authors <https://harelang.org>
|
||||
|
||||
// Path to the system MIME database.
|
||||
-export def SYSTEM_DB: str = "/etc/mime.types";
|
||||
+export def SYSTEM_DB: str = "@mailcap@/etc/mime.types";
|
||||
diff --git a/mime/+openbsd.ha b/mime/+openbsd.ha
|
||||
index 611b2dce..022f18c4 100644
|
||||
--- a/mime/+openbsd.ha
|
||||
+++ b/mime/+openbsd.ha
|
||||
@@ -2,4 +2,4 @@
|
||||
// (c) Hare authors <https://harelang.org>
|
||||
|
||||
// Path to the system MIME database.
|
||||
-export def SYSTEM_DB: str = "/usr/share/misc/mime.types";
|
||||
+export def SYSTEM_DB: str = "@mailcap@/etc/mime.types";
|
||||
@@ -8,7 +8,6 @@
|
||||
tzdata,
|
||||
mailcap,
|
||||
substituteAll,
|
||||
fetchpatch,
|
||||
callPackage,
|
||||
enableCrossCompilation ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit),
|
||||
pkgsCross,
|
||||
@@ -78,7 +77,7 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hare";
|
||||
version = "0.24.0";
|
||||
version = "0.24.2";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -89,7 +88,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "~sircmpwn";
|
||||
repo = "hare";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-3T+BdNj+Th8QXrcsPMWlN9GBfuMF1ulneWHpDEtyBU8=";
|
||||
hash = "sha256-61lckI0F+Ez5LR/8g6ftS0W7Q/+EU/1flTDFleBg6pc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -98,28 +97,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
src = ./001-tzdata.patch;
|
||||
inherit tzdata;
|
||||
})
|
||||
# Use correct comment syntax for debug+riscv64.
|
||||
(fetchpatch {
|
||||
url = "https://git.sr.ht/~sircmpwn/hare/commit/80e45e4d931a6e90d999846b86471cac00d2a6d5.patch";
|
||||
hash = "sha256-S7nXpiO0tYnKpmpj+fLkolGeHb1TrmgKlMF0+j0qLPQ=";
|
||||
})
|
||||
# Don't build haredoc since it uses the build `hare` bin, which breaks
|
||||
# cross-compilation.
|
||||
./002-dont-build-haredoc.patch
|
||||
# Hardcode harec and qbe.
|
||||
(substituteAll {
|
||||
src = ./003-hardcode-qbe-and-harec.patch;
|
||||
harec = lib.getExe harec;
|
||||
qbe = lib.getExe qbe;
|
||||
})
|
||||
# Display toolchains when using `hare version -v`.
|
||||
(fetchpatch {
|
||||
url = "https://git.sr.ht/~sircmpwn/hare/commit/e35f2284774436f422e06f0e8d290b173ced1677.patch";
|
||||
hash = "sha256-A59bGO/9tOghV8/MomTxd8xRExkHVdoMom2d+HTfQGg=";
|
||||
harec_bin = lib.getExe harec;
|
||||
qbe_bin = lib.getExe qbe;
|
||||
})
|
||||
# Use mailcap `/etc/mime.types` for Hare's mime module
|
||||
(substituteAll {
|
||||
src = ./003-use-mailcap-for-mimetypes.patch;
|
||||
src = ./004-use-mailcap-for-mimetypes.patch;
|
||||
inherit mailcap;
|
||||
})
|
||||
];
|
||||
|
||||
@@ -18,13 +18,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "harec";
|
||||
version = "0.24.0";
|
||||
version = "0.24.2";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~sircmpwn";
|
||||
repo = "harec";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-NOfoCT/wKZ3CXYzXZq7plXcun+MXQicfzBOmetXN7Qs=";
|
||||
hash = "sha256-YCUBdPYr/44stW9k54QoUEhNkti6ULJkVBphx7xhmKo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qbe ];
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchFromSourcehut,
|
||||
fetchpatch,
|
||||
hareHook,
|
||||
haredo,
|
||||
lib,
|
||||
scdoc,
|
||||
stdenv,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "treecat";
|
||||
@@ -22,6 +23,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-4A01MAGkBSSzkyRw4omNbLoX8z+pHfoUO7/6QvEUu70=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Update for Hare 0.24.2.
|
||||
(fetchpatch {
|
||||
url = "https://git.sr.ht/~autumnull/treecat/commit/53ad8126261051dd3b3493c34ae49f23db2c2d16.patch";
|
||||
hash = "sha256-cF/lMZjg1hB93rBXcjecT5Rrzb2Y73u6DSW1WcP5Vek=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
hareHook
|
||||
haredo
|
||||
|
||||
+3
-3
@@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hare-ev";
|
||||
version = "0-unstable-2024-01-04";
|
||||
version = "0-unstable-2024-07-07";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~sircmpwn";
|
||||
repo = "hare-ev";
|
||||
rev = "736ab9bb17257ee5eba3bc96f6650fc4a14608ea";
|
||||
hash = "sha256-SXExwDZKlW/2XYzmJUhkLWj6NF/znrv3vY9V0mD5iFQ=";
|
||||
rev = "aa01cdd0ba226ed9a4c5e6031e6aa7158aa05c9a";
|
||||
hash = "sha256-xq6d2+BbHk2iLg50mtqXqhkky/P9GeRAulSD7ouMnrA=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ hareHook ];
|
||||
|
||||
+3
-3
@@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hare-json";
|
||||
version = "0-unstable-2023-03-13";
|
||||
version = "0-unstable-2024-04-19";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~sircmpwn";
|
||||
repo = "hare-json";
|
||||
rev = "88256102a9fec62d494628e32cb406574e49e5e1";
|
||||
hash = "sha256-Sx+RBiLhR3ftP89AwinVlBg0u0HX4GVP7TLmuofgC9s=";
|
||||
rev = "b6aeae96199607a1f3b4d437d5c99f821bd6a6b6";
|
||||
hash = "sha256-mgUzHGXbaJdWm7qUn7mWdDUQBgbEjh42O+Lo0ok80Wo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ hareHook ];
|
||||
|
||||
+11
-2
@@ -1,5 +1,6 @@
|
||||
{
|
||||
fetchFromGitea,
|
||||
fetchpatch,
|
||||
hareHook,
|
||||
lib,
|
||||
nix-update-script,
|
||||
@@ -8,16 +9,24 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hare-toml";
|
||||
version = "0.1.1";
|
||||
version = "0.1.2";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "lunacb";
|
||||
repo = "hare-toml";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-r8T7Gy9c5polP+R12q0QRy4075nfGssDnNPQ8ARx/0M=";
|
||||
hash = "sha256-MfflJElDMu15UBuewssqhCEsNtzmN/H421H4HV+JCWc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Update strconv module functions for 0.24.2
|
||||
(fetchpatch {
|
||||
url = "https://codeberg.org/lunacb/hare-toml/commit/9849908ba1fd3457abd6c708272ecb896954d2bc.patch";
|
||||
hash = "sha256-herJZXJ8uusTO2b7Ddby2chIvDRuAPDFOPEt+wotTA0=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
scdoc
|
||||
hareHook
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "himitsu";
|
||||
version = "0.7";
|
||||
version = "0.8";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~sircmpwn";
|
||||
repo = "himitsu";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-jDxQajc8Kyfihm8q3wCpA+WsbAkQEZerLckLQXNhTa8=";
|
||||
hash = "sha256-+GQgRPJut+3zvzSyTGujTbbwJNNgHtFxAoEEwU0lbfU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
Reference in New Issue
Block a user