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"; }; }; }