Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6 testers, 7 supabase-cli, 8 nix-update-script, 9}: 10 11buildGoModule rec { 12 pname = "supabase-cli"; 13 version = "2.23.7"; 14 15 src = fetchFromGitHub { 16 owner = "supabase"; 17 repo = "cli"; 18 rev = "v${version}"; 19 hash = "sha256-djzeqSaDTAK8WR3y7hpDk6NpuGlGLMxLvgSTH1IvlWw="; 20 }; 21 22 vendorHash = "sha256-sjF0NEea51CKPWuZZHsDVZDtQaYz/94qM5iYwPb3jNo="; 23 24 ldflags = [ 25 "-s" 26 "-w" 27 "-X=github.com/supabase/cli/internal/utils.Version=${version}" 28 ]; 29 30 doCheck = false; # tests are trying to connect to localhost 31 32 nativeBuildInputs = [ installShellFiles ]; 33 34 postInstall = '' 35 rm $out/bin/{docs,listdep} 36 mv $out/bin/{cli,supabase} 37 38 installShellCompletion --cmd supabase \ 39 --bash <($out/bin/supabase completion bash) \ 40 --fish <($out/bin/supabase completion fish) \ 41 --zsh <($out/bin/supabase completion zsh) 42 ''; 43 44 passthru = { 45 tests.version = testers.testVersion { 46 package = supabase-cli; 47 }; 48 updateScript = nix-update-script { }; 49 }; 50 51 meta = with lib; { 52 description = "CLI for interacting with supabase"; 53 homepage = "https://github.com/supabase/cli"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ 56 gerschtli 57 kashw2 58 ]; 59 mainProgram = "supabase"; 60 }; 61}