nixpkgs/pkgs/applications/version-management/hut/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
760 B
Nix
Raw Normal View History

{ lib
, buildGoModule
, fetchFromSourcehut
, scdoc
}:
2022-04-02 20:35:38 +02:00
buildGoModule rec {
pname = "hut";
2023-04-16 08:45:03 +02:00
version = "0.3.0";
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=";
};
2023-04-16 08:45:03 +02:00
vendorHash = "sha256-aoqGb7g8UEC/ydmL3GbWGy3HDD1kfDJOMeUP4nO9waA=";
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 ];
};
}