depot/third_party/nixpkgs/pkgs/development/tools/supabase-cli/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

57 lines
1.3 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, testers
, supabase-cli
, nix-update-script
}:
buildGoModule rec {
pname = "supabase-cli";
version = "1.62.3";
src = fetchFromGitHub {
owner = "supabase";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-5MORYOBEyKcSdiZQI+xbi8GVQr8/e2dJCA9AiS1tm8U=";
};
vendorSha256 = "sha256-4ig9tkXNMiZa2HbwRPXlIsTiaYo8Tb3zxXUEfU8mFUA=";
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 ];
mainProgram = "supabase";
};
}