2022-07-18 16:21:45 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeBinaryWrapper, xdg-utils, installShellFiles, git }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lab";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "0.25.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zaquestion";
|
|
|
|
repo = "lab";
|
|
|
|
rev = "v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
sha256 = "sha256-VCvjP/bSd/0ywvNWPsseXn/SPkdp+BsXc/jTvB11EOk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
vendorSha256 = "sha256-ChysquNuUffcM3qaWUdqu3Av33gnKkdlotEoFKoedA0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper installShellFiles ];
|
2020-11-30 08:33:03 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-08-21 13:32:41 +00:00
|
|
|
# make xdg-open overrideable at runtime
|
|
|
|
wrapProgram $out/bin/lab \
|
|
|
|
--prefix PATH ":" "${lib.makeBinPath [ git ]}" \
|
|
|
|
--suffix PATH ":" "${lib.makeBinPath [ xdg-utils ]}"
|
2022-07-18 16:21:45 +00:00
|
|
|
installShellCompletion --cmd lab \
|
|
|
|
--bash <($out/bin/lab completion bash) \
|
|
|
|
--fish <($out/bin/lab completion fish) \
|
|
|
|
--zsh <($out/bin/lab completion zsh)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab";
|
|
|
|
homepage = "https://zaquestion.github.io/lab";
|
|
|
|
license = licenses.cc0;
|
2021-02-24 18:30:23 +00:00
|
|
|
maintainers = with maintainers; [ marsam dtzWill SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|