nixpkgs/pkgs/applications/version-management/git-and-tools/glab/default.nix

35 lines
790 B
Nix
Raw Normal View History

2020-11-26 16:27:31 +01:00
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "glab";
2021-09-30 20:15:04 +02:00
version = "1.21.1";
2020-11-26 16:27:31 +01:00
src = fetchFromGitHub {
owner = "profclems";
repo = pname;
rev = "v${version}";
2021-09-30 20:15:04 +02:00
sha256 = "sha256-naCCJ9s63UPDxRWbVjVikXtGUlM4Lp7vyDHlESEtXeI=";
2020-11-26 16:27:31 +01:00
};
2021-09-30 20:15:04 +02:00
vendorSha256 = "sha256-iiHDxiP6Dg7MK5jhSwly5oEhFZ8ByCx5WEyrbzL/u4w=";
2020-11-26 16:27:31 +01:00
runVend = true;
2021-08-11 13:40:24 +02:00
ldflags = [
"-X main.version=${version}"
];
preCheck = ''
# failed to read configuration: mkdir /homeless-shelter: permission denied
export HOME=$TMPDIR
'';
2020-11-26 16:27:31 +01:00
subPackages = [ "cmd/glab" ];
meta = with lib; {
description = "An open-source GitLab command line tool";
license = licenses.mit;
homepage = "https://glab.readthedocs.io/";
maintainers = with maintainers; [ freezeboy ];
};
}