mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
glab: install shell completions (#168166)
* glab: install shell completions * Update pkgs/applications/version-management/git-and-tools/glab/default.nix Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
8023ab5825
commit
ac83e58d62
1 changed files with 10 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, stdenv }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "glab";
|
||||
|
@ -24,6 +24,15 @@ buildGoModule rec {
|
|||
|
||||
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 = "An open-source GitLab command line tool";
|
||||
license = licenses.mit;
|
||||
|
|
Loading…
Reference in a new issue