2022-08-08 21:07:05 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hysteria";
|
2022-11-28 04:59:33 +00:00
|
|
|
version = "1.3.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-11-28 04:59:33 +00:00
|
|
|
sha256 = "sha256-va/2eCi7wu8YMKf/I0ZiDFAY/shaHA/boF1PCYFolwM=";
|
2022-08-08 21:07:05 +00:00
|
|
|
};
|
|
|
|
|
2022-11-28 04:59:33 +00:00
|
|
|
vendorSha256 = "sha256-a24NyJDatyM+j29vyY5zbPRhRTOGfa2c1FkZdKpDvxk=";
|
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}"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|