depot/third_party/nixpkgs/pkgs/applications/version-management/hut/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

41 lines
783 B
Nix

{ lib
, buildGoModule
, fetchFromSourcehut
, scdoc
}:
buildGoModule rec {
pname = "hut";
version = "0.5.0";
src = fetchFromSourcehut {
owner = "~emersion";
repo = "hut";
rev = "v${version}";
sha256 = "sha256-Gkxe9B48nwHOlqkgjMdFLBy7OiR7cwDDE3qLvWxJK+Y=";
};
vendorHash = "sha256-OYXRQEP4ACkypXmrorf2ew18819DB38SsYOM0u0steg=";
nativeBuildInputs = [
scdoc
];
makeFlags = [ "PREFIX=$(out)" ];
postBuild = ''
make $makeFlags completions doc/hut.1
'';
preInstall = ''
make $makeFlags install
'';
meta = with lib; {
homepage = "https://sr.ht/~emersion/hut/";
description = "CLI tool for Sourcehut / sr.ht";
license = licenses.agpl3Only;
maintainers = with maintainers; [ fgaz ];
mainProgram = "hut";
};
}