2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "tun2socks";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.5.2";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xjasonlyu";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-siAengVJXusQ5o9cTaADeRn5eW4IoCHkMMf6Bx8iWws=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
vendorHash = "sha256-zeiOcn33PnyoseYb0wynkn7MfGp3rHEYBStY98C6aR8=";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
ldflags = [
|
2024-01-25 14:12:00 +00:00
|
|
|
"-w" "-s"
|
2022-04-27 09:35:20 +00:00
|
|
|
"-X github.com/xjasonlyu/tun2socks/v2/internal/version.Version=v${version}"
|
|
|
|
"-X github.com/xjasonlyu/tun2socks/v2/internal/version.GitCommit=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/xjasonlyu/tun2socks";
|
|
|
|
description = "tun2socks - powered by gVisor TCP/IP stack";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
|
|
|
}
|