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";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.2.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}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-g9KbOtZaBAgy/iBBh/Tv5ULJNnNzwzZpA6DOynl+dnk=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
vendorSha256 = "sha256-vuAx8B34Za+GEtekFOUaY07hBk3O2OaJ1JmulbIhwbs=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|