2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, xdg-utils, installShellFiles, git }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lab";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "0.24.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zaquestion";
|
|
|
|
repo = "lab";
|
|
|
|
rev = "v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-sw00D/PJaLAPHoPdJC2WYUNklIzMbc/bXt2jlQZ7E90=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
vendorSha256 = "sha256-FwnVMH//GwFbi+llFF6XNqrZX2hRB4r51p8TRz2vN+g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper 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 = ''
|
2021-02-05 17:12:51 +00:00
|
|
|
wrapProgram $out/bin/lab --prefix PATH ":" "${lib.makeBinPath [ git xdg-utils ]}";
|
2021-01-09 10:05:03 +00:00
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/lab completion $shell > lab.$shell
|
|
|
|
installShellCompletion lab.$shell
|
|
|
|
done
|
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
|
|
|
}
|