2022-11-20 20:06:11 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2023-04-25 15:04:23 +00:00
|
|
|
, testers
|
|
|
|
, supabase-cli
|
2022-12-21 22:12:18 +00:00
|
|
|
, nix-update-script
|
2022-11-20 20:06:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "supabase-cli";
|
2024-02-08 02:39:53 +00:00
|
|
|
version = "1.142.2";
|
2022-11-20 20:06:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "supabase";
|
|
|
|
repo = "cli";
|
|
|
|
rev = "v${version}";
|
2024-02-08 02:39:53 +00:00
|
|
|
hash = "sha256-Jy1PA54z+TbEq8GMF/VCRyFAHfZcqtyztZS7O9ZI9vw=";
|
2022-11-20 20:06:11 +00:00
|
|
|
};
|
|
|
|
|
2024-02-08 02:39:53 +00:00
|
|
|
vendorHash = "sha256-lktHD3i9briqWLO4BaWkP2RZyAQZgg3P1jq5QxueHiw=";
|
2022-11-20 20:06:11 +00:00
|
|
|
|
2023-04-25 14:36:40 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=github.com/supabase/cli/internal/utils.Version=${version}"
|
|
|
|
];
|
2022-11-20 20:06:11 +00:00
|
|
|
|
|
|
|
doCheck = false; # tests are trying to connect to localhost
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2023-04-17 01:06:04 +00:00
|
|
|
rm $out/bin/{codegen,docs,listdep}
|
2022-11-20 20:06:11 +00:00
|
|
|
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)
|
|
|
|
'';
|
|
|
|
|
2023-04-25 15:04:23 +00:00
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = supabase-cli;
|
|
|
|
};
|
|
|
|
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;
|
2023-09-01 04:57:43 +00:00
|
|
|
maintainers = with maintainers; [ gerschtli kashw2 ];
|
2022-11-20 20:06:11 +00:00
|
|
|
mainProgram = "supabase";
|
|
|
|
};
|
|
|
|
}
|