mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-07 14:23:19 +00:00
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, testers
|
|
, supabase-cli
|
|
, nix-update-script
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "supabase-cli";
|
|
version = "1.73.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "supabase";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Gl5jIMh0zH7BWFKny4cT3QpwM0/W9Bd9ycRYbNPxXAQ=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-6wJxAD3s5UcAqPJy6CzHe1aP097+aXHjBNG4BJ0zhmQ=";
|
|
|
|
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";
|
|
};
|
|
}
|