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";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.3.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}";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-kr5EWQ3zHUp/oNPZV2d3j9AyoEmHEX8/rETiMKTBi3s=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
vendorHash = "sha256-aoqGb7g8UEC/ydmL3GbWGy3HDD1kfDJOMeUP4nO9waA=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|