6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, nix-update-script
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "supabase-cli";
|
|
version = "1.29.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "supabase";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-VA2OU2lnrbqNrQgyxYz2fh+jrJkHWTIOVrdYBwaK2kI=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-pzbwHnUCZkHmj+ZKJJ3zGG1pVHYlvoMMF3jx9FYg01U=";
|
|
|
|
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 { };
|
|
|
|
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";
|
|
};
|
|
}
|