hare: unstable-2023-11-27 -> 0-unstable-2024-02-01

Enable new debuggin features described on Hare's blog[0].

[0]: https://harelang.org/blog/2024-02-01-debugging-features/
This commit is contained in:
Gustavo Coutinho de Souza 2024-02-02 16:22:34 -03:00
parent d59e2b500e
commit 7b9a168c35
No known key found for this signature in database
GPG Key ID: 59081FCB8F9AABB5

View File

@ -8,6 +8,7 @@
, scdoc
, tzdata
, substituteAll
, unstableGitUpdater
, callPackage
, enableCrossCompilation ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit)
, pkgsCross
@ -16,7 +17,7 @@
, riscv64PkgsCrossToolchain ? pkgsCross.riscv64
}:
# There's no support for `aarch64-freebsd` or `riscv64-freebsd` on nix.
# There's no support for `aarch64` or `riscv64` for freebsd nor for openbsd on nix.
# See `lib.systems.doubles.aarch64` and `lib.systems.doubles.riscv64`.
assert let
inherit (stdenv.hostPlatform) isLinux is64bit;
@ -33,7 +34,6 @@ let
# We use harec's override of qbe until 1.2 is released, but the `qbe` argument
# is kept to avoid breakage.
qbe = harec.qbeUnstable;
# https://harelang.org/platforms/
arch = stdenv.hostPlatform.uname.processor;
platform = lib.toLower stdenv.hostPlatform.uname.system;
embeddedOnBinaryTools =
@ -60,15 +60,15 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "hare";
version = "unstable-2023-11-27";
version = "0-unstable-2024-02-01";
outputs = [ "out" "man" ];
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "hare";
rev = "d94f355481a320fb2aec13ef62cb3bfe2416f5e4";
hash = "sha256-Mpl3VO4xvLCKHeYr/FPuS6jl8CkyeqDz18mQ6Zv05oc=";
rev = "4d387ed61968f468e43571d15485b498e28acaec";
hash = "sha256-vVL8e+P/lnp0/jO+lQ/q0CehwxAvXh+FPOMJ8r+2Ftk=";
};
patches = [
@ -96,7 +96,6 @@ stdenv.mkDerivation (finalAttrs: {
makeFlags = [
"HARECACHE=.harecache"
"PREFIX=${builtins.placeholder "out"}"
"PLATFORM=${platform}"
"ARCH=${arch}"
# Strip the variable of an empty $(SRCDIR)/hare/third-party, since nix does
# not follow the FHS.
@ -122,8 +121,8 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
preConfigure = ''
ln -s config.example.mk config.mk
postConfigure = ''
ln -s configs/${platform}.mk config.mk
'';
postFixup = ''
@ -134,6 +133,7 @@ stdenv.mkDerivation (finalAttrs: {
setupHook = ./setup-hook.sh;
passthru = {
updateScript = unstableGitUpdater { };
tests = lib.optionalAttrs enableCrossCompilation {
crossCompilation = callPackage ./cross-compilation-tests.nix {
hare = finalAttrs.finalPackage;