2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, scdoc
|
|
|
|
}:
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
buildGoModule rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "hut";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.5.0";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~emersion";
|
|
|
|
repo = "hut";
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-Gkxe9B48nwHOlqkgjMdFLBy7OiR7cwDDE3qLvWxJK+Y=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
vendorHash = "sha256-OYXRQEP4ACkypXmrorf2ew18819DB38SsYOM0u0steg=";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
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 = "A CLI tool for Sourcehut / sr.ht";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "hut";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|