-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsupabase-cli-stable.nix
56 lines (46 loc) · 1.44 KB
/
supabase-cli-stable.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# [supabase-cli](https://github.com/supabase/cli) is the main CLI interface for [supabase](https://supabase.com)
{ lib
, buildGoModule
, installShellFiles
, fetchFromGitHub
, testers
, supabase-cli
}:
buildGoModule rec {
pname = "supabase-cli-stable";
version = "2.2.1";
src = fetchFromGitHub {
owner = "supabase";
repo = "cli";
rev = "v${version}";
hash = "sha256-m7v31fG3ASbOFGv+IsV5IwnKyr+31i4yAAVpawvFHpo=";
};
vendorHash = "sha256-QIt7a+NVd3hubxKOA2kGjouBO5ve7qmIRTIVRpsXmdk=";
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/{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;
};
};
meta = with lib; {
description = "Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema";
homepage = "https://github.com/supabase/cli";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
mainProgram = "supabase";
};
}