turso-cli: Install shell completions
This commit is contained in:
parent
9f20229c6c
commit
d8abaa6147
1 changed files with 11 additions and 0 deletions
|
@ -1,12 +1,16 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGo121Module,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
}:
|
||||
buildGo121Module rec {
|
||||
pname = "turso-cli";
|
||||
version = "0.85.3";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tursodatabase";
|
||||
repo = "turso-cli";
|
||||
|
@ -23,6 +27,13 @@ buildGo121Module rec {
|
|||
echo "v${version}" > internal/cmd/version.txt
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd turso \
|
||||
--bash <($out/bin/turso completion bash) \
|
||||
--fish <($out/bin/turso completion fish) \
|
||||
--zsh <($out/bin/turso completion zsh)
|
||||
'';
|
||||
|
||||
# Test_setDatabasesCache fails due to /homeless-shelter: read-only file system error.
|
||||
doCheck = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue