Unverified Commit 665cbdb5 authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #217885 from cbrewster/nsc-completion

nsc: add shell completion
parents cddd703f 4816e023
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:

buildGoModule rec {
@@ -24,6 +25,15 @@ buildGoModule rec {

  vendorHash = "sha256-gDwppx0ORG+pXzTdGtUVbiFyTD/P7avt+/V89Gl0QYY=";

  nativeBuildInputs = [ installShellFiles ];

  postInstall = ''
    installShellCompletion --cmd nsc \
      --bash <($out/bin/nsc completion bash) \
      --fish <($out/bin/nsc completion fish) \
      --zsh <($out/bin/nsc completion zsh)
  '';

  preCheck = ''
    # Tests attempt to write to the home directory.
    export HOME=$(mktemp -d)