bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
41 lines
783 B
Nix
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";
|
|
};
|
|
}
|