nixpkgs/pkgs/development/tools/supabase-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.1 KiB
Nix
Raw Normal View History

2022-11-20 20:06:11 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
2022-12-21 22:12:18 +00:00
, nix-update-script
2022-11-20 20:06:11 +00:00
}:
buildGoModule rec {
pname = "supabase-cli";
2023-01-09 01:48:26 +00:00
version = "1.29.3";
2022-11-20 20:06:11 +00:00
src = fetchFromGitHub {
owner = "supabase";
repo = "cli";
rev = "v${version}";
2023-01-09 01:48:26 +00:00
sha256 = "sha256-VA2OU2lnrbqNrQgyxYz2fh+jrJkHWTIOVrdYBwaK2kI=";
2022-11-20 20:06:11 +00:00
};
2023-01-09 01:48:26 +00:00
vendorSha256 = "sha256-pzbwHnUCZkHmj+ZKJJ3zGG1pVHYlvoMMF3jx9FYg01U=";
2022-11-20 20:06:11 +00:00
ldflags = [ "-s" "-w" "-X" "github.com/supabase/cli/cmd.version=${version}" ];
doCheck = false; # tests are trying to connect to localhost
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
rm $out/bin/{codegen,docgen,listdep}
mv $out/bin/{cli,supabase}
installShellCompletion --cmd supabase \
--bash <($out/bin/supabase completion bash) \
--fish <($out/bin/supabase completion fish) \
--zsh <($out/bin/supabase completion zsh)
'';
passthru.updateScript = nix-update-script { };
2022-12-21 22:12:18 +00:00
2022-11-20 20:06:11 +00:00
meta = with lib; {
description = "A CLI for interacting with supabase";
homepage = "https://github.com/supabase/cli";
license = licenses.mit;
maintainers = with maintainers; [ gerschtli ];
mainProgram = "supabase";
};
}