diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index f37f854f320f..0107b7422368 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -27928,6 +27928,12 @@ githubId = 57048005; name = "snicket2100"; }; + snifexx = { + name = "Matteo Bonesoli"; + email = "snifex@phnxdev.eu"; + githubId = 71451061; + github = "snifexx"; + }; sno2wman = { name = "SnO2WMaN"; email = "me@sno2wman.net"; diff --git a/pkgs/by-name/ha/hare-update/package.nix b/pkgs/by-name/ha/hare-update/package.nix new file mode 100644 index 000000000000..a672389dd635 --- /dev/null +++ b/pkgs/by-name/ha/hare-update/package.nix @@ -0,0 +1,46 @@ +{ + fetchFromSourcehut, + hareHook, + lib, + stdenv, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hare-update"; + version = "0.26.0.0"; + + strictDeps = true; + __structuredAttrs = true; + + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = "hare-update"; + tag = finalAttrs.version; + hash = "sha256-E6N9UMYdNTgy0tppBgOwT14WUXvjliSh/ps16fPDFN8="; + }; + + nativeBuildInputs = [ + hareHook + ]; + + makeFlags = [ "PREFIX=${placeholder "out"}" ]; + + meta = { + description = "Tool for assisting in updating Hare codebases affected by breaking changes"; + longDescription = '' + hare-update is a Hare add-on which assists in migrating a Hare codebases + to a newer release of Hare by scanning your code, identifying areas + impacted by breaking changes, and suggesting the appropriate fix. + ''; + homepage = "https://git.sr.ht/~sircmpwn/hare-update"; + license = lib.licenses.eupl12; + maintainers = with lib.maintainers; [ snifexx ]; + # Same as the harec package except with added netbsd. harec also supports netbsd, so... + platforms = + with lib.platforms; + lib.intersectLists (netbsd ++ freebsd ++ openbsd ++ linux) (aarch64 ++ x86_64 ++ riscv64); + # Same as the harec package. The harec developers do not explicitly supprt + # MacOS, even if ports exists + badPlatforms = lib.platforms.darwin; + }; +}) diff --git a/pkgs/by-name/ha/hare/package.nix b/pkgs/by-name/ha/hare/package.nix index a8ae59f0e60c..a6220e54711f 100644 --- a/pkgs/by-name/ha/hare/package.nix +++ b/pkgs/by-name/ha/hare/package.nix @@ -175,7 +175,10 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://harelang.org/"; description = "Systems programming language designed to be simple, stable, and robust"; license = lib.licenses.gpl3Only; - maintainers = with lib.maintainers; [ sikmir ]; + maintainers = with lib.maintainers; [ + sikmir + snifexx + ]; mainProgram = "hare"; inherit (harec.meta) platforms badPlatforms; }; diff --git a/pkgs/by-name/ha/hare/setup-hook.sh b/pkgs/by-name/ha/hare/setup-hook.sh index 388ed9bcf25f..5f532cdb06fc 100644 --- a/pkgs/by-name/ha/hare/setup-hook.sh +++ b/pkgs/by-name/ha/hare/setup-hook.sh @@ -7,6 +7,13 @@ addHarepath() { fi } +addHareToolpath() { + local -r toolpath="${1-}/libexec/hare" + if [[ -d "$toolpath" ]]; then + addToSearchPath HARE_TOOLPATH "$toolpath" + fi +} + # Hare's stdlib should come after its third party libs, since the latter may # expand or shadow the former. readonly hareSetStdlibPhase=' @@ -34,3 +41,4 @@ HARECACHE="$(mktemp -d)" export HARECACHE addEnvHooks "$hostOffset" addHarepath +addEnvHooks "$hostOffset" addHareToolpath