1 { lib, buildGoModule, fetchFromGitLab, installShellFiles, stdenv }:
7 src = fetchFromGitLab {
11 hash = "sha256-H1yYjI7ct/YO44czX5J0cHc/YbhxtXJQThJcARyUEq0=";
14 vendorHash = "sha256-4CQ4NPHAs736LQxDxvKWEH9TQvIKAouJ6zVReAoZTec=";
19 "-X main.version=${version}"
23 # failed to read configuration: mkdir /homeless-shelter: permission denied
27 subPackages = [ "cmd/glab" ];
29 nativeBuildInputs = [ installShellFiles ];
31 postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
33 installManPage share/man/man1/*
34 installShellCompletion --cmd glab \
35 --bash <($out/bin/glab completion -s bash) \
36 --fish <($out/bin/glab completion -s fish) \
37 --zsh <($out/bin/glab completion -s zsh)
41 description = "GitLab CLI tool bringing GitLab to your command line";
42 license = licenses.mit;
43 homepage = "https://gitlab.com/gitlab-org/cli";
44 changelog = "https://gitlab.com/gitlab-org/cli/-/releases/v${version}";
45 maintainers = with maintainers; [ freezeboy ];