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.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ lib, buildGoModule, fetchFromGitLab, installShellFiles, stdenv }:
|
|
|
|
buildGoModule rec {
|
|
pname = "glab";
|
|
version = "1.24.1";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "gitlab-org";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-CUchYPMBTINkMJg8TC8rKMVkrcj/Gy+ZxV7jbtMFvpg=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-NuK63ibb1t+HnSR/gCFS7HWVtfGLazVx2M+qxRNCR1I=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${version}"
|
|
];
|
|
|
|
preCheck = ''
|
|
# failed to read configuration: mkdir /homeless-shelter: permission denied
|
|
export HOME=$TMPDIR
|
|
'';
|
|
|
|
subPackages = [ "cmd/glab" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
|
installShellCompletion --cmd glab \
|
|
--bash <($out/bin/glab completion -s bash) \
|
|
--fish <($out/bin/glab completion -s fish) \
|
|
--zsh <($out/bin/glab completion -s zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "GitLab CLI tool bringing GitLab to your command line";
|
|
license = licenses.mit;
|
|
homepage = "https://gitlab.com/gitlab-org/cli";
|
|
maintainers = with maintainers; [ freezeboy ];
|
|
};
|
|
}
|