From bf4c9c67fdbdb35a8cf1fdb13281ac20248e2ccd Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Tue, 19 May 2026 19:44:59 +0300 Subject: [PATCH 1/2] supabase-cli: 2.98.2 -> 2.100.1 --- pkgs/by-name/su/supabase-cli/package.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/su/supabase-cli/package.nix b/pkgs/by-name/su/supabase-cli/package.nix index 6f78a1ad0df2..3aead787ef07 100644 --- a/pkgs/by-name/su/supabase-cli/package.nix +++ b/pkgs/by-name/su/supabase-cli/package.nix @@ -10,16 +10,19 @@ buildGoModule (finalAttrs: { pname = "supabase-cli"; - version = "2.98.2"; + version = "2.100.1"; src = fetchFromGitHub { owner = "supabase"; repo = "cli"; rev = "v${finalAttrs.version}"; - hash = "sha256-ZiptplUqebmId7noXuVXu9G5y1SW8+FGV6WqPH8R3Cw="; + hash = "sha256-vCaPZXf4I2f9kJDBDsZcl1q8PIM35NxwuLTeq1aastw="; }; - vendorHash = "sha256-2BIP500MgABRzsG13UaUVv8KKtA0dPM0U10Uk/rfVQY="; + # Supabase is in the process of porting the CLI to TS, for now we continue with the Go cli. + sourceRoot = "${finalAttrs.src.name}/apps/cli-go"; + + vendorHash = "sha256-MebmiEFfWozJV/zEQyRtjmd9eR2nG3ZXcpyY6lEEQgI="; ldflags = [ "-s" From d831d3e72332664bbb680098e3461a8b7ad9c6bf Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Tue, 19 May 2026 19:45:32 +0300 Subject: [PATCH 2/2] supabase-cli: modernize package - Use versionCheckHook instead of testers.testVersion - Enable __structuredAttrs - Use tag instead of rev for fetchFromGitHub - Drop -w from ldflags - Flatten passthru --- pkgs/by-name/su/supabase-cli/package.nix | 28 +++++++++++------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/su/supabase-cli/package.nix b/pkgs/by-name/su/supabase-cli/package.nix index 3aead787ef07..4944a52392c1 100644 --- a/pkgs/by-name/su/supabase-cli/package.nix +++ b/pkgs/by-name/su/supabase-cli/package.nix @@ -3,8 +3,7 @@ buildGoModule, fetchFromGitHub, installShellFiles, - testers, - supabase-cli, + versionCheckHook, nix-update-script, }: @@ -12,10 +11,12 @@ buildGoModule (finalAttrs: { pname = "supabase-cli"; version = "2.100.1"; + __structuredAttrs = true; + src = fetchFromGitHub { owner = "supabase"; repo = "cli"; - rev = "v${finalAttrs.version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-vCaPZXf4I2f9kJDBDsZcl1q8PIM35NxwuLTeq1aastw="; }; @@ -26,16 +27,18 @@ buildGoModule (finalAttrs: { ldflags = [ "-s" - "-w" "-X=github.com/supabase/cli/internal/utils.Version=${finalAttrs.version}" ]; subPackages = [ "." ]; - doCheck = false; # tests are trying to connect to localhost - nativeBuildInputs = [ installShellFiles ]; + doCheck = false; # Root Go package does not have any tests. + + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + postInstall = '' mv $out/bin/{cli,supabase} @@ -45,15 +48,10 @@ buildGoModule (finalAttrs: { --zsh <($out/bin/supabase completion zsh) ''; - passthru = { - tests.version = testers.testVersion { - package = supabase-cli; - }; - updateScript = nix-update-script { - # Fetch versions from GitHub releases to detect pre-releases and - # avoid updating to them. - extraArgs = [ "--use-github-releases" ]; - }; + passthru.updateScript = nix-update-script { + # Fetch versions from GitHub releases to detect pre-releases and + # avoid updating to them. + extraArgs = [ "--use-github-releases" ]; }; meta = {