2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, buildGo121Module
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
2023-10-09 19:29:22 +00:00
|
|
|
buildGo121Module rec {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "hysteria";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2.0.3";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-07-15 17:15:38 +00:00
|
|
|
owner = "apernet";
|
2022-08-21 13:32:41 +00:00
|
|
|
repo = pname;
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "app/v${version}";
|
|
|
|
hash = "sha256-0ekw92T9yWrKu5MxSssOCXlUFubiVLoH6ZLEMDFkcis=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-Hf+Jx/z+hJ6jqWLJHGK7umNgNzNKYgQtCdAosdrqvPg=";
|
2022-08-12 12:06:08 +00:00
|
|
|
proxyVendor = true;
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.appVersion=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
mv $out/bin/app $out/bin/hysteria
|
2022-10-06 18:32:54 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# Network required
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A feature-packed proxy & relay utility optimized for lossy, unstable connections";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/apernet/hysteria";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ oluceps ];
|
|
|
|
};
|
|
|
|
}
|