Unverified Commit 35502f30 authored by Artturi's avatar Artturi Committed by GitHub
Browse files

Merge pull request #259090 from Fryuni/turso

parents fa845cc3 37250559
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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";
+15 −3
Original line number Diff line number Diff line
{
  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 ];
  };
}