From f078136b5afaea86fa5e423b52ddf860469b150c Mon Sep 17 00:00:00 2001 From: Varun Narravula Date: Mon, 22 Dec 2025 15:27:21 -0800 Subject: [PATCH] fix(nix): disable tests, set meta.mainProgram for package --- flake.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flake.nix b/flake.nix index 112ec02..03e2e5f 100644 --- a/flake.nix +++ b/flake.nix @@ -37,14 +37,26 @@ vendorHash = "sha256-5Xr6mwPtsqEliKeKv2rhhp6JC7u3coP4nnhIxGMqccU="; + nativeInstallCheckInputs = [ pkgs.versionCheckHook ]; + env = { CGO_ENABLED = 0; }; ldflags = [ + "-s" + "-w" "-X main.newtVersion=${version}" ]; + # Tests are broken due to a lack of Internet. + # Disable running `go test`, and instead do + # a simple version check instead. + doCheck = false; + doInstallCheck = true; + + versionCheckProgramArg = [ "-version" ]; + meta = { description = "A tunneling client for Pangolin"; homepage = "https://github.com/fosrl/newt"; @@ -52,6 +64,7 @@ maintainers = [ lib.maintainers.water-sucks ]; + mainProgram = "newt"; }; }; }