From d59e2b500e109226a7bfa722c5250f734fc22d8f Mon Sep 17 00:00:00 2001 From: Gustavo Coutinho de Souza Date: Mon, 5 Feb 2024 08:26:38 -0300 Subject: [PATCH 1/4] harec: unstable-2023-11-29 -> 0-unstable-2024-01-29 --- pkgs/by-name/ha/harec/package.nix | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/ha/harec/package.nix b/pkgs/by-name/ha/harec/package.nix index cbcb53b1ac4e..a19861570c0d 100644 --- a/pkgs/by-name/ha/harec/package.nix +++ b/pkgs/by-name/ha/harec/package.nix @@ -3,29 +3,33 @@ , fetchFromSourcehut , qbe , fetchgit +, unstableGitUpdater }: let # harec needs the dbgfile and dbgloc features implemented up to this commit. - # This can be dropped once 1.2 is released, for a possible release date see: + # This can be dropped once 1.2 is released. For a possible release date, see: # https://lists.sr.ht/~mpu/qbe/%3CZPkmHE9KLohoEohE%40cloudsdale.the-delta.net.eu.org%3E qbe' = qbe.overrideAttrs (_old: { - version = "1.1-unstable-2023-08-18"; + version = "1.1-unstable-2024-01-12"; src = fetchgit { url = "git://c9x.me/qbe.git"; - rev = "36946a5142c40b733d25ea5ca469f7949ee03439"; - hash = "sha256-bqxWFP3/aw7kRoD6ictbFcjzijktHvh4AgWAXBIODW8="; + rev = "85287081c4a25785dec1ec48c488a5879b3c37ac"; + hash = "sha256-7bVbxUU/HXJXLtAxhoK0URmPtjGwMSZrPkx8WKl52Mg="; }; }); + + platform = lib.toLower stdenv.hostPlatform.uname.system; + arch = stdenv.hostPlatform.uname.processor; in stdenv.mkDerivation (finalAttrs: { pname = "harec"; - version = "unstable-2023-11-29"; + version = "0-unstable-2024-01-29"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "harec"; - rev = "ec3193e3870436180b0f3df82b769adc57a1c099"; - hash = "sha256-HXQIgFC4YVDJjo5xbyg1ea3jWYKLEwKkD1KFzWFz9UI= "; + rev = "f9e17e633845d8d38566b4ea32db0a29ac85d96e"; + hash = "sha256-Xy9VOcDtbJUz3z6Vk8bqH41VbAFKtJ9fzPGEwVz8KQM="; }; nativeBuildInputs = [ @@ -36,15 +40,26 @@ stdenv.mkDerivation (finalAttrs: { qbe' ]; + makeFlags = [ + "PREFIX=${builtins.placeholder "out"}" + "ARCH=${arch}" + ]; + strictDeps = true; + enableParallelBuilding = true; doCheck = true; + postConfigure = '' + ln -s configs/${platform}.mk config.mk + ''; + passthru = { # We create this attribute so that the `hare` package can access the # overwritten `qbe`. qbeUnstable = qbe'; + updateScript = unstableGitUpdater { }; }; meta = { @@ -57,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: { # https://harelang.org/platforms/ # UPDATE: https://github.com/hshq/harelang provides a MacOS port platforms = with lib.platforms; - lib.intersectLists (freebsd ++ linux) (aarch64 ++ x86_64 ++ riscv64); + lib.intersectLists (freebsd ++ openbsd ++ linux) (aarch64 ++ x86_64 ++ riscv64); badPlatforms = lib.platforms.darwin; }; }) From 7b9a168c3504b973407b456284927e5b6038072c Mon Sep 17 00:00:00 2001 From: Gustavo Coutinho de Souza Date: Fri, 2 Feb 2024 16:22:34 -0300 Subject: [PATCH 2/4] 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/ --- pkgs/by-name/ha/hare/package.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/ha/hare/package.nix b/pkgs/by-name/ha/hare/package.nix index a41bcb90a513..c2b75b43d44a 100644 --- a/pkgs/by-name/ha/hare/package.nix +++ b/pkgs/by-name/ha/hare/package.nix @@ -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; From 41f9a903268cb5e56e933177749febb5c3b55a5a Mon Sep 17 00:00:00 2001 From: Gustavo Coutinho de Souza Date: Fri, 2 Feb 2024 22:34:01 -0300 Subject: [PATCH 3/4] hareThirdParty.hare-ev: unstable-2023-12-04 -> 0-unstable-2024-01-04 By updating `hare-ev`, the `bonsai` build also succeeds. --- pkgs/development/hare-third-party/hare-ev/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/hare-third-party/hare-ev/default.nix b/pkgs/development/hare-third-party/hare-ev/default.nix index 902a56e3e10f..ecde53882347 100644 --- a/pkgs/development/hare-third-party/hare-ev/default.nix +++ b/pkgs/development/hare-third-party/hare-ev/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation { pname = "hare-ev"; - version = "unstable-2023-12-04"; + version = "0-unstable-2024-01-04"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "hare-ev"; - rev = "e3c3f7613c602672ac41a3e47c106a5bd27a2378"; - hash = "sha256-TQsR2lXJfkPu53WpJy/K+Jruyfw8mCkEIE9DbFQoS+s="; + rev = "736ab9bb17257ee5eba3bc96f6650fc4a14608ea"; + hash = "sha256-SXExwDZKlW/2XYzmJUhkLWj6NF/znrv3vY9V0mD5iFQ="; }; nativeCheckInputs = [ From e2dec02c09ecab40953e0225c80eed433b960560 Mon Sep 17 00:00:00 2001 From: Gustavo Coutinho de Souza Date: Fri, 2 Feb 2024 22:44:14 -0300 Subject: [PATCH 4/4] hareThirdParty.hare-toml: 0.1.0 -> 0.1.0-unstable-2023-12-27 --- .../hare-third-party/hare-toml/default.nix | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/pkgs/development/hare-third-party/hare-toml/default.nix b/pkgs/development/hare-third-party/hare-toml/default.nix index 98cc670ef941..39a387605652 100644 --- a/pkgs/development/hare-third-party/hare-toml/default.nix +++ b/pkgs/development/hare-third-party/hare-toml/default.nix @@ -3,36 +3,20 @@ , scdoc , lib , fetchFromGitea -, fetchpatch , nix-update-script }: stdenv.mkDerivation (finalAttrs: { pname = "hare-toml"; - version = "0.1.0"; + version = "0.1.0-unstable-2023-12-27"; src = fetchFromGitea { domain = "codeberg.org"; owner = "lunacb"; repo = "hare-toml"; - rev = "v${finalAttrs.version}"; - hash = "sha256-JKK5CcDmAW7FH7AzFwgsr9i13eRSXDUokWfZix7f4yY="; + rev = "022d0a8d59e5518029f72724a46e6133b934774c"; + hash = "sha256-DsVcbh1zn8GNKzzb+1o6bfgiVigrxHw/5Xm3uuUhRy0="; }; - patches = [ - # Remove `abort()` calls from never returning expressions. - (fetchpatch { - name = "remove-abort-from-never-returning-expressions.patch"; - url = "https://codeberg.org/lunacb/hare-toml/commit/f26e7cdfdccd2e82c9fce7e9fca8644b825b40f1.patch"; - hash = "sha256-DFbrxiaV4lQlFmMzo5GbMubIQ4hU3lXgsJqoyeFWf2g="; - }) - # Fix make's install target to install the correct files - (fetchpatch { - name = "install-correct-files-with-install-target.patch"; - url = "https://codeberg.org/lunacb/hare-toml/commit/b79021911fe7025a8f5ddd97deb2c4d18c67b25e.patch"; - hash = "sha256-IL+faumX6BmdyePXTzsSGgUlgDBqOXXzShupVAa7jlQ="; - }) - ]; - nativeBuildInputs = [ scdoc hare