newt-go: init at 1.1.3

Tunneling client for Pangolin

https://github.com/fosrl/newt
This commit is contained in:
Fabian Affolter 2025-05-19 17:11:03 +02:00
parent 616e381988
commit 3aa3566fca

View file

@ -0,0 +1,45 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
pname = "newt";
version = "1.1.3";
src = fetchFromGitHub {
owner = "fosrl";
repo = "newt";
tag = version;
hash = "sha256-wfm2UI4QUiYiAJIYBiSCOD/w72WRJIv2cyLIkfqGsek=";
};
vendorHash = "sha256-8VlT9cy2uNhQPiUpr1jJuQSgUR6TtlbQ+etran2Htxs=";
postPatch = ''
substituteInPlace main.go \
--replace-fail "replaceme" "${version}"
'';
nativeInstallCheckInputs = [ versionCheckHook ];
ldflags = [
"-s"
"-w"
];
doInstallCheck = true;
versionCheckProgramArg = [ "-version" ];
meta = {
description = "Tunneling client for Pangolin";
homepage = "https://github.com/fosrl/newt";
changelog = "https://github.com/fosrl/newt/releases/tag/${src.tag}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "newt";
};
}