We do not use a "plugin system" for Git addons anymore, and therefore this directory is no longer useful. Indeed that directory is way more confusing, given that it includes more than mere Git addons, going from Bitbucket server command-line tools to complete rewrites of Git in exotic programming languages. Also, without this directory, the mental load of decision-making reduces a lot. When anyone is interested in including a new git-related tool, just put it into pkgs/applications/version-management, without apologies.
42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, makeBinaryWrapper, xdg-utils, installShellFiles, git }:
|
|
|
|
buildGoModule rec {
|
|
pname = "lab";
|
|
version = "0.25.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zaquestion";
|
|
repo = "lab";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-VCvjP/bSd/0ywvNWPsseXn/SPkdp+BsXc/jTvB11EOk=";
|
|
};
|
|
|
|
subPackages = [ "." ];
|
|
|
|
vendorSha256 = "sha256-ChysquNuUffcM3qaWUdqu3Av33gnKkdlotEoFKoedA0=";
|
|
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper installShellFiles ];
|
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
|
|
|
postInstall = ''
|
|
# make xdg-open overrideable at runtime
|
|
wrapProgram $out/bin/lab \
|
|
--prefix PATH ":" "${lib.makeBinPath [ git ]}" \
|
|
--suffix PATH ":" "${lib.makeBinPath [ xdg-utils ]}"
|
|
installShellCompletion --cmd lab \
|
|
--bash <($out/bin/lab completion bash) \
|
|
--fish <($out/bin/lab completion fish) \
|
|
--zsh <($out/bin/lab completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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 ];
|
|
};
|
|
}
|