From af3f97a3d6169403b14f6e956f4c49f17ebdd230 Mon Sep 17 00:00:00 2001 From: Ethan Carter Edwards Date: Wed, 29 Apr 2026 23:17:45 -0400 Subject: [PATCH] vespa-cli: init at 8.679.50 Homepage: https://github.com/vespa-engine/vespa/tree/v8.680.18/client/go Download page: https://vespa.ai/ Description: vespa-cli is the command line interface for vespa.ai Signed-off-by: Ethan Carter Edwards --- pkgs/by-name/ve/vespa-cli/package.nix | 82 +++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pkgs/by-name/ve/vespa-cli/package.nix diff --git a/pkgs/by-name/ve/vespa-cli/package.nix b/pkgs/by-name/ve/vespa-cli/package.nix new file mode 100644 index 000000000000..cea4b89a6b7e --- /dev/null +++ b/pkgs/by-name/ve/vespa-cli/package.nix @@ -0,0 +1,82 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + versionCheckHook, + writableTmpDirAsHomeHook, + nix-update-script, +}: + +buildGoModule (finalAttrs: { + pname = "vespa-cli"; + version = "8.679.50"; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "vespa-engine"; + repo = "vespa"; + tag = "v${finalAttrs.version}"; + hash = "sha256-4tABoAA96HoYghIno0qbieYbE4EJZRmFIFDnoOoMIaA="; + }; + + # case-insensitive conflicts which produce platform `vendorHash` checksumm + proxyVendor = true; + + sourceRoot = "${finalAttrs.src.name}/client/go"; + + vendorHash = "sha256-qC/8pIhsVbt9uUyLDiAW18tCUWDw3Agvmcx/CIUsCKQ="; + + env.CGO_ENABLED = 0; + + ldflags = [ + "-s" + "-X github.com/vespa-engine/vespa/client/go/internal/build.Version=${finalAttrs.version}" + ]; + + checkFlags = + let + skippedTests = [ + # these tests try to call home + "TestAuthShow/auth_show" + "TestDeployCloud" + "TestDeployCloudFastWait" + "TestDeployCloudUnauthorized" + "TestDestroy" + "TestLogCloud" + "TestProdDeploy" + "TestProdDeployInvalidZip" + "TestProdDeployWarnsOnInstance" + "TestProdDeployWithJava" + "TestProdDeployWithWait" + "TestProdDeployWithoutCertificate" + "TestProdDeployWithoutTests" + "TestSingleTestWithCloudAndEndpoints" + "TestSingleTestWithCloudAndTokenAuth" + "TestStatusCloudDeployment" + # tries to call home for most recent version but we have our own test + "TestVersion" + "TestVersionCheckHomebrew" + ]; + in + [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; + + nativeInstallCheckInputs = [ + versionCheckHook + writableTmpDirAsHomeHook + ]; + versionCheckProgramArg = "version"; + versionCheckKeepEnvironment = [ "HOME" ]; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Command-line tool for Vespa.ai"; + downloadPage = "https://github.com/vespa-engine/vespa/blob/v${finalAttrs.version}/client/go"; + changelog = "https://github.com/vespa-engine/vespa/releases/tag/v${finalAttrs.version}"; + homepage = "https://vespa.ai/"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ethancedwards8 ]; + mainProgram = "vespa"; + }; +})