Files
nixpkgs/pkgs/by-name/hu/hut/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
950 B
Nix

{
lib,
buildGoModule,
fetchFromSourcehut,
scdoc,
}:
buildGoModule (finalAttrs: {
pname = "hut";
version = "0.7.0";
src = fetchFromSourcehut {
owner = "~xenrox";
repo = "hut";
rev = "v${finalAttrs.version}";
hash = "sha256-pc6E3ORDmaMhoNe8GQeYZrxhe5ySQqsMPe/iUbclnGk=";
};
vendorHash = "sha256-/51cv/EvcBCyCOf91vJ5M75p0bkAQqVoRUp+C+i70Os=";
nativeBuildInputs = [
scdoc
];
makeFlags = [ "PREFIX=$(out)" ];
ldflags = [
# Recommended in 0.7.0 release notes https://git.sr.ht/~xenrox/hut/refs/v0.7.0
"-X main.version=v${finalAttrs.version}"
];
postBuild = ''
make $makeFlags completions doc/hut.1
'';
preInstall = ''
make $makeFlags install
'';
meta = {
homepage = "https://sr.ht/~xenrox/hut/";
description = "CLI tool for Sourcehut / sr.ht";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ fgaz ];
mainProgram = "hut";
};
})