bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, testers
|
|
, supabase-cli
|
|
, nix-update-script
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "supabase-cli";
|
|
version = "1.169.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "supabase";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
hash = "sha256-H0y/eBmUG5nT/EsF1iC5hbhRBhR8jwwxlYav4Q7bSqM=";
|
|
};
|
|
|
|
vendorHash = "sha256-wZ+yYPwmePKMfYTve3Ha7teSx1mlHLnc1ZaZE6ZEdu4=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/supabase/cli/internal/utils.Version=${version}"
|
|
];
|
|
|
|
doCheck = false; # tests are trying to connect to localhost
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
rm $out/bin/{codegen,docs,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 = {
|
|
tests.version = testers.testVersion {
|
|
package = supabase-cli;
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "CLI for interacting with supabase";
|
|
homepage = "https://github.com/supabase/cli";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ gerschtli kashw2 ];
|
|
mainProgram = "supabase";
|
|
};
|
|
}
|