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

39 lines
1.1 KiB
Nix
Raw Normal View History

2021-02-01 08:05:09 +00:00
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, xdg-utils, installShellFiles, git }:
2018-12-15 14:37:35 +00:00
buildGoModule rec {
pname = "lab";
2021-03-17 14:10:13 +00:00
version = "0.21.0";
2018-12-15 14:37:35 +00:00
src = fetchFromGitHub {
owner = "zaquestion";
repo = "lab";
rev = "v${version}";
2021-03-17 14:10:13 +00:00
sha256 = "sha256-mkhJmrKpIISd0m0m8fQ9vKuEr6h23BBxK6yo5fB+xcA=";
2018-12-15 14:37:35 +00:00
};
subPackages = [ "." ];
2021-03-17 14:10:13 +00:00
vendorSha256 = "sha256-cf+DVnGjSNV2eZ8S/Vk+VPlykoSjngrQuPeA9IshBUg=";
2019-12-13 05:00:00 +00:00
doCheck = false;
nativeBuildInputs = [ makeWrapper installShellFiles ];
2019-12-13 05:00:00 +00:00
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
2018-12-15 14:37:35 +00:00
postInstall = ''
2021-02-01 08:05:09 +00:00
wrapProgram $out/bin/lab --prefix PATH ":" "${lib.makeBinPath [ git xdg-utils ]}";
for shell in bash fish zsh; do
$out/bin/lab completion $shell > lab.$shell
installShellCompletion lab.$shell
done
'';
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";
homepage = "https://zaquestion.github.io/lab";
license = licenses.cc0;
maintainers = with maintainers; [ marsam dtzWill SuperSandro2000 ];
2018-12-15 14:37:35 +00:00
};
}