fosrl-newt: 1.5.2 -> 1.7.0, modernize (#470284)

This commit is contained in:
Fernando Rodrigues
2025-12-14 05:42:45 +00:00
committed by GitHub
+8 -8
View File
@@ -3,37 +3,36 @@
buildGoModule,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
buildGoModule rec {
pname = "newt";
version = "1.5.2";
version = "1.7.0";
src = fetchFromGitHub {
owner = "fosrl";
repo = "newt";
tag = version;
hash = "sha256-svMAMPK8f5cwIPzr0+WdoWzHDV1jtuO1Lm2oZIVHE6k=";
hash = "sha256-R6X9DOu1iGS/a4d5kmKoBZI0L5k7S0w3SHHFQnQH/ho=";
};
vendorHash = "sha256-wNdZEfPx12T0jvCEDkz04X8N6t/pNIOXWFSTHteeZYs=";
postPatch = ''
substituteInPlace main.go \
--replace-fail "version_replaceme" "${version}"
'';
vendorHash = "sha256-5Xr6mwPtsqEliKeKv2rhhp6JC7u3coP4nnhIxGMqccU=";
nativeInstallCheckInputs = [ versionCheckHook ];
ldflags = [
"-s"
"-w"
"-X=main.newtVersion=${version}"
];
doInstallCheck = true;
versionCheckProgramArg = [ "-version" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Tunneling client for Pangolin";
homepage = "https://github.com/fosrl/newt";
@@ -43,6 +42,7 @@ buildGoModule rec {
fab
jackr
sigmasquadron
water-sucks
];
mainProgram = "newt";
};