nagiosPlugins.check_ssl_cert: 2.85.1 -> 2.86.0 (#379244)
[NixPkgs.git] / pkgs / by-name / tu / turso-cli / package.nix
blobb050c1ef68d7ae4dacd91d5fdde1c0d69bbe045c
2   lib,
3   stdenv,
4   buildGoModule,
5   fetchFromGitHub,
6   installShellFiles,
7   nix-update-script,
8 }:
9 buildGoModule rec {
10   pname = "turso-cli";
11   version = "0.97.2";
13   src = fetchFromGitHub {
14     owner = "tursodatabase";
15     repo = "turso-cli";
16     rev = "v${version}";
17     hash = "sha256-6Ci1QESSN6wNpUAQoWtTyHWrGaI/3xs/jGCSkJsYC8o=";
18   };
20   vendorHash = "sha256-tBO21IgUczwMgrEyV7scV3YTY898lYHASaLeXqvBopU=";
22   nativeBuildInputs = [ installShellFiles ];
24   ldflags = [
25     "-X github.com/tursodatabase/turso-cli/internal/cmd.version=v${version}"
26   ];
28   preCheck = ''
29     export HOME=$(mktemp -d)
30   '';
32   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
33     installShellCompletion --cmd turso \
34       --bash <($out/bin/turso completion bash) \
35       --fish <($out/bin/turso completion fish) \
36       --zsh <($out/bin/turso completion zsh)
37   '';
39   passthru.updateScript = nix-update-script { };
41   meta = with lib; {
42     description = "This is the command line interface (CLI) to Turso";
43     homepage = "https://turso.tech";
44     mainProgram = "turso";
45     license = licenses.mit;
46     maintainers = with maintainers; [
47       zestsystem
48       kashw2
49       fryuni
50     ];
51   };