depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/hut/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

40 lines
762 B
Nix

{ lib
, buildGoModule
, fetchFromSourcehut
, scdoc
}:
buildGoModule rec {
pname = "hut";
version = "0.2.0";
src = fetchFromSourcehut {
owner = "~emersion";
repo = "hut";
rev = "v${version}";
sha256 = "sha256-g9KbOtZaBAgy/iBBh/Tv5ULJNnNzwzZpA6DOynl+dnk=";
};
vendorSha256 = "sha256-vuAx8B34Za+GEtekFOUaY07hBk3O2OaJ1JmulbIhwbs=";
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 ];
};
}