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