2021-02-01 08:05:09 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, xdg-utils, installShellFiles, git }:
|
2018-12-15 14:37:35 +00:00
|
|
|
|
2019-03-18 06:13:52 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lab";
|
2021-09-30 04:20:00 +00:00
|
|
|
version = "0.23.0";
|
2018-12-15 14:37:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zaquestion";
|
|
|
|
repo = "lab";
|
|
|
|
rev = "v${version}";
|
2021-09-30 04:20:00 +00:00
|
|
|
sha256 = "0g8v3cli8rvr0zsxiv4w0afzqmh0d85a832c4hc75b3f9amkr0dl";
|
2018-12-15 14:37:35 +00:00
|
|
|
};
|
|
|
|
|
2019-03-18 06:13:52 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-09-30 04:20:00 +00:00
|
|
|
vendorSha256 = "09xn5vycb9shygs13pfwxlb89j6rhrbplm10mfgxi4kzlvm7agl6";
|
2019-12-13 05:00:00 +00:00
|
|
|
|
2020-08-04 00:26:27 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-06 03:25:32 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
2020-10-20 15:01:09 +00:00
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2018-12-15 14:37:35 +00:00
|
|
|
|
2019-03-17 21:10:35 +00:00
|
|
|
postInstall = ''
|
2021-02-01 08:05:09 +00:00
|
|
|
wrapProgram $out/bin/lab --prefix PATH ":" "${lib.makeBinPath [ git xdg-utils ]}";
|
2021-01-06 03:25:32 +00:00
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/lab completion $shell > lab.$shell
|
|
|
|
installShellCompletion lab.$shell
|
|
|
|
done
|
2019-03-17 21:10:35 +00:00
|
|
|
'';
|
|
|
|
|
2020-10-20 15:01:09 +00:00
|
|
|
meta = with lib; {
|
2018-12-15 14:37:35 +00:00
|
|
|
description = "Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://zaquestion.github.io/lab";
|
2019-05-31 17:57:17 +00:00
|
|
|
license = licenses.cc0;
|
2021-02-23 16:16:18 +00:00
|
|
|
maintainers = with maintainers; [ marsam dtzWill SuperSandro2000 ];
|
2018-12-15 14:37:35 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|