2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
, buildGoModule
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
2023-11-16 04:20:00 +00:00
|
|
|
buildGoModule rec {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "hysteria";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.4.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}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-4i3bXtg7WCSPDE7fUWVJnOOFNGLAo1F/a2wbuUH785o=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
vendorHash = "sha256-dV/bomGPg0Q3OEDuu6vRVsFRveDVzw6Hv0KLla2uZqc=";
|
2022-08-12 12:06:08 +00:00
|
|
|
proxyVendor = true;
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
ldflags =
|
|
|
|
let cmd = "github.com/apernet/hysteria/app/cmd";
|
|
|
|
in [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X ${cmd}.appVersion=${version}"
|
|
|
|
"-X ${cmd}.appType=release"
|
|
|
|
];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
platforms = platforms.unix;
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ oluceps ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "hysteria";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
}
|