diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b355bf8f9988..6ea4fd57e0a7 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5997,6 +5997,15 @@ githubId = 134872; name = "Sergei Lukianov"; }; + fryuni = { + name = "Luiz Ferraz"; + email = "luiz@lferraz.com"; + github = "Fryuni"; + githubId = 11063910; + keys = [{ + fingerprint = "2109 4B0E 560B 031E F539 62C8 2B56 8731 DB24 47EC"; + }]; + }; fsagbuya = { email = "fa@m-labs.ph"; github = "fsagbuya"; diff --git a/pkgs/development/tools/turso-cli/default.nix b/pkgs/development/tools/turso-cli/default.nix index 36376e7c8579..0859e1a362c2 100644 --- a/pkgs/development/tools/turso-cli/default.nix +++ b/pkgs/development/tools/turso-cli/default.nix @@ -1,7 +1,9 @@ { lib, + stdenv, buildGo121Module, fetchFromGitHub, + installShellFiles, }: buildGo121Module rec { pname = "turso-cli"; @@ -16,6 +18,8 @@ buildGo121Module rec { vendorHash = "sha256-Hv4CacBrRX2YT3AkbNzyWrA9Ex6YMDPrPvezukwMkTE="; + nativeBuildInputs = [ installShellFiles ]; + # Build with production code tags = ["prod"]; # Include version for `turso --version` reporting @@ -23,14 +27,22 @@ buildGo121Module rec { echo "v${version}" > internal/cmd/version.txt ''; - # Test_setDatabasesCache fails due to /homeless-shelter: read-only file system error. - doCheck = false; + preCheck = '' + export HOME=$(mktemp -d) + ''; + + 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) + ''; meta = with lib; { description = "This is the command line interface (CLI) to Turso."; homepage = "https://turso.tech"; mainProgram = "turso"; license = licenses.mit; - maintainers = with maintainers; [ zestsystem kashw2 ]; + maintainers = with maintainers; [ zestsystem kashw2 fryuni ]; }; }