504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
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.129.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "supabase";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
hash = "sha256-/qApBCjwgnuCHP6DsK4LE5KA6RVu8lV84fxGVkrKyOs=";
|
|
};
|
|
|
|
vendorHash = "sha256-lFholyFVr6uMcfafM/tb8r1/4ysgWZOW5neoy3uL0Vw=";
|
|
|
|
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 = "A CLI for interacting with supabase";
|
|
homepage = "https://github.com/supabase/cli";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ gerschtli kashw2 ];
|
|
mainProgram = "supabase";
|
|
};
|
|
}
|