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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.2 KiB
Nix
Raw Normal View History

2022-07-16 04:20:00 +00:00
{ lib, buildGoModule, fetchFromGitHub, makeBinaryWrapper, xdg-utils, installShellFiles, git }:
2018-12-15 14:37:35 +00:00
buildGoModule rec {
pname = "lab";
2022-07-16 04:20:00 +00:00
version = "0.25.1";
2018-12-15 14:37:35 +00:00
src = fetchFromGitHub {
owner = "zaquestion";
repo = "lab";
rev = "v${version}";
2022-07-16 04:20:00 +00:00
sha256 = "sha256-VCvjP/bSd/0ywvNWPsseXn/SPkdp+BsXc/jTvB11EOk=";
2018-12-15 14:37:35 +00:00
};
subPackages = [ "." ];
2022-05-18 04:20:00 +00:00
vendorSha256 = "sha256-ChysquNuUffcM3qaWUdqu3Av33gnKkdlotEoFKoedA0=";
2019-12-13 05:00:00 +00:00
doCheck = false;
2022-07-16 04:20:00 +00:00
nativeBuildInputs = [ makeBinaryWrapper installShellFiles ];
2021-08-26 06:45:51 +00:00
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
2018-12-15 14:37:35 +00:00
postInstall = ''
# make xdg-open overrideable at runtime
wrapProgram $out/bin/lab \
--prefix PATH ":" "${lib.makeBinPath [ git ]}" \
--suffix PATH ":" "${lib.makeBinPath [ xdg-utils ]}"
2022-07-16 04:20:00 +00:00
installShellCompletion --cmd lab \
--bash <($out/bin/lab completion bash) \
--fish <($out/bin/lab completion fish) \
--zsh <($out/bin/lab completion zsh)
'';
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
};
}