2020-03-27 10:33:21 +03:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub }:
|
2018-12-15 17:37:35 +03:00
|
|
|
|
2019-03-18 09:13:52 +03:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lab";
|
2019-12-18 21:36:00 +03:00
|
|
|
version = "0.17.2";
|
2018-12-15 17:37:35 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zaquestion";
|
|
|
|
repo = "lab";
|
|
|
|
rev = "v${version}";
|
2019-12-18 21:36:00 +03:00
|
|
|
sha256 = "0zkwvmzgj7h8lc8jkg2a81392b28c8hkwqzj6dds6q4asbmymx5c";
|
2018-12-15 17:37:35 +03:00
|
|
|
};
|
|
|
|
|
2019-03-18 09:13:52 +03:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2020-05-01 04:59:00 +03:00
|
|
|
vendorSha256 = "1lrmafvv5zfn9kc0p8g5vdz351n1zbaqwhwk861fxys0rdpqskyc";
|
2019-12-13 08:00:00 +03:00
|
|
|
|
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
2018-12-15 17:37:35 +03:00
|
|
|
|
2019-03-18 00:10:35 +03:00
|
|
|
postInstall = ''
|
2019-05-31 20:57:17 +03:00
|
|
|
mkdir -p "$out/share/bash-completion/completions" "$out/share/zsh/site-functions"
|
|
|
|
export LAB_CORE_HOST=a LAB_CORE_USER=b LAB_CORE_TOKEN=c
|
|
|
|
$out/bin/lab completion bash > $out/share/bash-completion/completions/lab
|
2019-03-18 00:10:35 +03:00
|
|
|
$out/bin/lab completion zsh > $out/share/zsh/site-functions/_lab
|
|
|
|
'';
|
|
|
|
|
2018-12-15 17:37:35 +03:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://zaquestion.github.io/lab";
|
2019-05-31 20:57:17 +03:00
|
|
|
license = licenses.cc0;
|
2019-03-18 09:13:52 +03:00
|
|
|
maintainers = with maintainers; [ marsam dtzWill ];
|
2018-12-15 17:37:35 +03:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2020-05-01 04:59:00 +03:00
|
|
|
}
|