1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

tenv: only generate shell completions when possible (#351899)

This commit is contained in:
Nick Cao 2024-10-29 15:26:59 -04:00 committed by GitHub
commit f246178556
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
{ buildGoModule, fetchFromGitHub, installShellFiles, lib, tenv, testers }:
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles, lib, tenv, testers }:
buildGoModule rec {
pname = "tenv";
@ -23,7 +23,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd tenv \
--zsh <($out/bin/tenv completion zsh) \
--bash <($out/bin/tenv completion bash) \