nixpkgs/pkgs/by-name/go/gost/package.nix
2025-07-02 06:11:53 +00:00

54 lines
1.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
buildGoModule,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "gost";
version = "3.1.0";
src = fetchFromGitHub {
owner = "go-gost";
repo = "gost";
tag = "v${finalAttrs.version}";
hash = "sha256-4ZfGxhXespaZNspvbwZ/Yz2ncqtY3wxJPQsqVILayao=";
};
vendorHash = "sha256-lWuLvYF9Sl+k8VnsujvRmj7xb9zst+g//Gkg7VwtWkg=";
# Based on ldflags in upstream's .goreleaser.yaml
ldflags = [
"-s"
"-X main.version=v${finalAttrs.version}"
];
__darwinAllowLocalNetworking = true;
# i/o timeout
doCheck = !stdenv.hostPlatform.isDarwin;
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "-V";
passthru.updateScript = nix-update-script { };
meta = {
description = "Simple tunnel written in golang";
homepage = "https://github.com/go-gost/gost";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
pmy
ramblurr
moraxyc
];
mainProgram = "gost";
};
})