2022-08-08 21:07:05 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hysteria";
|
2022-09-11 16:04:36 +00:00
|
|
|
version = "1.2.1";
|
2022-08-08 21:07:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "HyNetwork";
|
2022-08-15 03:28:28 +00:00
|
|
|
repo = pname;
|
2022-08-08 21:07:05 +00:00
|
|
|
rev = "v${version}";
|
2022-09-11 16:04:36 +00:00
|
|
|
sha256 = "sha256-xL8xRVJdCyaP39TO+cJLAPbdc7WHxgBQMEyxkyhWlA8=";
|
2022-08-08 21:07:05 +00:00
|
|
|
};
|
|
|
|
|
2022-10-09 00:33:13 +00:00
|
|
|
vendorSha256 = "sha256-VCQHkkYmGU0ZPmTuYu2XFa5ezDJ3x7dZGN+Usmq4sOY=";
|
2022-08-08 21:07:05 +00:00
|
|
|
proxyVendor = true;
|
|
|
|
|
2022-09-11 16:04:36 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.appVersion=${version}"
|
|
|
|
"-X main.appCommit=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cmd $out/bin/hysteria
|
|
|
|
'';
|
|
|
|
|
2022-08-08 21:07:05 +00:00
|
|
|
# Network required
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A feature-packed proxy & relay utility optimized for lossy, unstable connections";
|
|
|
|
homepage = "https://github.com/HyNetwork/hysteria";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ oluceps ];
|
|
|
|
};
|
|
|
|
}
|