mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 12:53:05 +00:00
a211d94291
after https://github.com/Mic92/nix-update/pull/120 and https://github.com/NixOS/nixpkgs/pull/207703, `attrPath` can now be omitted when using `nix-update-script`
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, nix-update-script
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "supabase-cli";
|
|
version = "1.27.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "supabase";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-pF94rGVWhW0KIoSHijkqsoMkzrNd21ncGU+PKqffkZU=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-RO9dZP236Kt8SSpZFF7KRksrjgwiEkPxE5DIMUK69Kw=";
|
|
|
|
ldflags = [ "-s" "-w" "-X" "github.com/supabase/cli/cmd.version=${version}" ];
|
|
|
|
doCheck = false; # tests are trying to connect to localhost
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
rm $out/bin/{codegen,docgen,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.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";
|
|
};
|
|
}
|