lol

hare: 0.24.0 -> 0.24.2

Also set the correct index for mailcap patch and change harec and qbe
binaries replacement for a more explicit placeholder.

+72 -49
+30 -13
pkgs/by-name/ha/hare/001-tzdata.patch
··· 1 1 diff --git a/time/chrono/+freebsd.ha b/time/chrono/+freebsd.ha 2 - index 26d78ab1..6861bfe8 100644 2 + index af49080e..3dde7963 100644 3 3 --- a/time/chrono/+freebsd.ha 4 4 +++ b/time/chrono/+freebsd.ha 5 - @@ -2,7 +2,7 @@ 5 + @@ -2,8 +2,8 @@ 6 6 // (c) Hare authors <https://harelang.org> 7 - 7 + 8 8 def LOCALTIME_PATH: str = "/etc/localtime"; 9 - -def ZONEINFO_PREFIX: str = "/usr/share/zoneinfo/"; 10 - +def ZONEINFO_PREFIX: str = "@tzdata@/share/zoneinfo/"; 11 - 9 + -def TZDB_PATH: str = "/usr/share/zoneinfo/"; 10 + +def TZDB_PATH: str = "@tzdata@/share/zoneinfo/"; 11 + 12 12 // The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI 13 13 // leap second data. 14 + -export def UTC_LEAPSECS_PATH: str = "/var/db/ntpd.leap-seconds.list"; 15 + +export def UTC_LEAPSECS_PATH: str = "@tzdata@/share/zoneinfo/leap-seconds.list"; 14 16 diff --git a/time/chrono/+linux.ha b/time/chrono/+linux.ha 15 - index 600f606c..8d5617e2 100644 17 + index 2756fd6f..1ea22385 100644 16 18 --- a/time/chrono/+linux.ha 17 19 +++ b/time/chrono/+linux.ha 18 20 @@ -2,8 +2,8 @@ 19 21 // (c) Hare authors <https://harelang.org> 20 - 22 + 23 + def LOCALTIME_PATH: str = "/etc/localtime"; 24 + -def TZDB_PATH: str = "/usr/share/zoneinfo/"; 25 + +def TZDB_PATH: str = "@tzdata@/share/zoneinfo/"; 26 + 27 + // The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI 28 + // leap second data. 29 + -export def UTC_LEAPSECS_PATH: str = "/usr/share/zoneinfo/leap-seconds.list"; 30 + +export def UTC_LEAPSECS_PATH: str = "@tzdata@/share/zoneinfo/leap-seconds.list"; 31 + diff --git a/time/chrono/+openbsd.ha b/time/chrono/+openbsd.ha 32 + index 2756fd6f..1ea22385 100644 33 + --- a/time/chrono/+openbsd.ha 34 + +++ b/time/chrono/+openbsd.ha 35 + @@ -2,8 +2,8 @@ 36 + // (c) Hare authors <https://harelang.org> 37 + 21 38 def LOCALTIME_PATH: str = "/etc/localtime"; 22 - -def ZONEINFO_PREFIX: str = "/usr/share/zoneinfo/"; 23 - +def ZONEINFO_PREFIX: str = "@tzdata@/share/zoneinfo/"; 24 - 39 + -def TZDB_PATH: str = "/usr/share/zoneinfo/"; 40 + +def TZDB_PATH: str = "@tzdata@/share/zoneinfo/"; 41 + 25 42 // The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI 26 43 // leap second data. 27 - -export def UTC_LEAPSECS_FILE: str = "/usr/share/zoneinfo/leap-seconds.list"; 28 - +export def UTC_LEAPSECS_FILE: str = "@tzdata@/share/zoneinfo/leap-seconds.list"; 44 + -export def UTC_LEAPSECS_PATH: str = "/usr/share/zoneinfo/leap-seconds.list"; 45 + +export def UTC_LEAPSECS_PATH: str = "@tzdata@/share/zoneinfo/leap-seconds.list";
+7 -7
pkgs/by-name/ha/hare/003-hardcode-qbe-and-harec.patch
··· 1 1 diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha 2 - index b2ac6518..417b46c6 100644 2 + index ce19af9e..8631b325 100644 3 3 --- a/cmd/hare/build.ha 4 4 +++ b/cmd/hare/build.ha 5 - @@ -37,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = { 5 + @@ -36,7 +36,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = { 6 6 case let ncpu: size => 7 7 yield ncpu; 8 8 }, 9 9 - version = build::get_version(os::tryenv("HAREC", "harec"))?, 10 - + version = build::get_version(os::tryenv("HAREC", "@harec@"))?, 11 - arch = arch.qbe_name, 10 + + version = build::get_version(os::tryenv("HAREC", "@harec_bin@"))?, 11 + arch = arch, 12 12 platform = build::get_platform(os::sysname())?, 13 13 ... 14 - @@ -145,8 +145,8 @@ fn build(name: str, cmd: *getopt::command) (void | error) = { 14 + @@ -143,8 +143,8 @@ fn build(name: str, cmd: *getopt::command) (void | error) = { 15 15 set_arch_tags(&ctx.ctx.tags, arch); 16 16 17 17 ctx.cmds = ["", 18 18 - os::tryenv("HAREC", "harec"), 19 19 - os::tryenv("QBE", "qbe"), 20 - + os::tryenv("HAREC", "@harec@"), 21 - + os::tryenv("QBE", "@qbe@"), 20 + + os::tryenv("HAREC", "@harec_bin@"), 21 + + os::tryenv("QBE", "@qbe_bin@"), 22 22 os::tryenv("AS", arch.as_cmd), 23 23 os::tryenv("LD", arch.ld_cmd), 24 24 ];
-13
pkgs/by-name/ha/hare/003-use-mailcap-for-mimetypes.patch
··· 1 - diff --git a/mime/system.ha b/mime/system.ha 2 - index 73ff3496..42e7b640 100644 3 - --- a/mime/system.ha 4 - +++ b/mime/system.ha 5 - @@ -11,7 +11,7 @@ use strings; 6 - use types; 7 - 8 - // Path to the system MIME database. 9 - -export def SYSTEM_DB: str = "/etc/mime.types"; 10 - +export def SYSTEM_DB: str = "@mailcap@/etc/mime.types"; 11 - 12 - @init fn init() void = { 13 - // Done in a separate function so we can discard errors here
+30
pkgs/by-name/ha/hare/004-use-mailcap-for-mimetypes.patch
··· 1 + diff --git a/mime/+freebsd.ha b/mime/+freebsd.ha 2 + index e536d9bd..022f18c4 100644 3 + --- a/mime/+freebsd.ha 4 + +++ b/mime/+freebsd.ha 5 + @@ -2,4 +2,4 @@ 6 + // (c) Hare authors <https://harelang.org> 7 + 8 + // Path to the system MIME database. 9 + -export def SYSTEM_DB: str = "/etc/mime.types"; 10 + +export def SYSTEM_DB: str = "@mailcap@/etc/mime.types"; 11 + diff --git a/mime/+linux.ha b/mime/+linux.ha 12 + index e536d9bd..022f18c4 100644 13 + --- a/mime/+linux.ha 14 + +++ b/mime/+linux.ha 15 + @@ -2,4 +2,4 @@ 16 + // (c) Hare authors <https://harelang.org> 17 + 18 + // Path to the system MIME database. 19 + -export def SYSTEM_DB: str = "/etc/mime.types"; 20 + +export def SYSTEM_DB: str = "@mailcap@/etc/mime.types"; 21 + diff --git a/mime/+openbsd.ha b/mime/+openbsd.ha 22 + index 611b2dce..022f18c4 100644 23 + --- a/mime/+openbsd.ha 24 + +++ b/mime/+openbsd.ha 25 + @@ -2,4 +2,4 @@ 26 + // (c) Hare authors <https://harelang.org> 27 + 28 + // Path to the system MIME database. 29 + -export def SYSTEM_DB: str = "/usr/share/misc/mime.types"; 30 + +export def SYSTEM_DB: str = "@mailcap@/etc/mime.types";
+5 -16
pkgs/by-name/ha/hare/package.nix
··· 8 8 tzdata, 9 9 mailcap, 10 10 substituteAll, 11 - fetchpatch, 12 11 callPackage, 13 12 enableCrossCompilation ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit), 14 13 pkgsCross, ··· 78 77 in 79 78 stdenv.mkDerivation (finalAttrs: { 80 79 pname = "hare"; 81 - version = "0.24.0"; 80 + version = "0.24.2"; 82 81 83 82 outputs = [ 84 83 "out" ··· 89 88 owner = "~sircmpwn"; 90 89 repo = "hare"; 91 90 rev = finalAttrs.version; 92 - hash = "sha256-3T+BdNj+Th8QXrcsPMWlN9GBfuMF1ulneWHpDEtyBU8="; 91 + hash = "sha256-61lckI0F+Ez5LR/8g6ftS0W7Q/+EU/1flTDFleBg6pc="; 93 92 }; 94 93 95 94 patches = [ ··· 98 97 src = ./001-tzdata.patch; 99 98 inherit tzdata; 100 99 }) 101 - # Use correct comment syntax for debug+riscv64. 102 - (fetchpatch { 103 - url = "https://git.sr.ht/~sircmpwn/hare/commit/80e45e4d931a6e90d999846b86471cac00d2a6d5.patch"; 104 - hash = "sha256-S7nXpiO0tYnKpmpj+fLkolGeHb1TrmgKlMF0+j0qLPQ="; 105 - }) 106 100 # Don't build haredoc since it uses the build `hare` bin, which breaks 107 101 # cross-compilation. 108 102 ./002-dont-build-haredoc.patch 109 103 # Hardcode harec and qbe. 110 104 (substituteAll { 111 105 src = ./003-hardcode-qbe-and-harec.patch; 112 - harec = lib.getExe harec; 113 - qbe = lib.getExe qbe; 114 - }) 115 - # Display toolchains when using `hare version -v`. 116 - (fetchpatch { 117 - url = "https://git.sr.ht/~sircmpwn/hare/commit/e35f2284774436f422e06f0e8d290b173ced1677.patch"; 118 - hash = "sha256-A59bGO/9tOghV8/MomTxd8xRExkHVdoMom2d+HTfQGg="; 106 + harec_bin = lib.getExe harec; 107 + qbe_bin = lib.getExe qbe; 119 108 }) 120 109 # Use mailcap `/etc/mime.types` for Hare's mime module 121 110 (substituteAll { 122 - src = ./003-use-mailcap-for-mimetypes.patch; 111 + src = ./004-use-mailcap-for-mimetypes.patch; 123 112 inherit mailcap; 124 113 }) 125 114 ];