3
0
Fork 0
forked from mirrors/nixpkgs
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-05-22 07:36:22 +01:00
version = "0.22.0";
2018-12-15 14:37:35 +00:00
src = fetchFromGitHub {
owner = "zaquestion";
repo = "lab";
rev = "v${version}";
2021-05-22 07:36:22 +01:00
sha256 = "sha256-CyXEmlsc40JtwDjRYNWqN+3cuoG8K07jAQdd1rktvS8=";
2018-12-15 14:37:35 +00:00
};
subPackages = [ "." ];
2021-05-22 07:36:22 +01:00
vendorSha256 = "sha256-PSS7OPbM+XsylqDlWc4h+oZrOua2kSWKLEuyjqo/cxM=";
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
};
}