2022-03-23 05:51:47 +01:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, scdoc
|
|
|
|
}:
|
|
|
|
|
2022-04-02 20:35:38 +02:00
|
|
|
buildGoModule rec {
|
2022-03-23 05:51:47 +01:00
|
|
|
pname = "hut";
|
2023-04-16 08:45:03 +02:00
|
|
|
version = "0.3.0";
|
2022-03-23 05:51:47 +01:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~emersion";
|
|
|
|
repo = "hut";
|
2022-04-02 20:35:38 +02:00
|
|
|
rev = "v${version}";
|
2023-04-16 08:45:03 +02:00
|
|
|
sha256 = "sha256-kr5EWQ3zHUp/oNPZV2d3j9AyoEmHEX8/rETiMKTBi3s=";
|
2022-03-23 05:51:47 +01:00
|
|
|
};
|
|
|
|
|
2023-04-16 08:45:03 +02:00
|
|
|
vendorHash = "sha256-aoqGb7g8UEC/ydmL3GbWGy3HDD1kfDJOMeUP4nO9waA=";
|
2022-03-23 05:51:47 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|