504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
42 lines
944 B
Nix
42 lines
944 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "hysteria";
|
|
version = "2.2.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "apernet";
|
|
repo = pname;
|
|
rev = "app/v${version}";
|
|
hash = "sha256-xvnshGDQ69yXZ5BnEYAhoJOXG0uZ0lZRnp/rdnmNAkE=";
|
|
};
|
|
|
|
vendorHash = "sha256-zjj5MhCVQbsLwZs7LcGhozXGmfzFrDipNsEswiseMYI=";
|
|
proxyVendor = true;
|
|
|
|
ldflags =
|
|
let cmd = "github.com/apernet/hysteria/app/cmd";
|
|
in [
|
|
"-s"
|
|
"-w"
|
|
"-X ${cmd}.appVersion=${version}"
|
|
"-X ${cmd}.appType=release"
|
|
];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/app $out/bin/hysteria
|
|
'';
|
|
|
|
# Network required
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "A feature-packed proxy & relay utility optimized for lossy, unstable connections";
|
|
homepage = "https://github.com/apernet/hysteria";
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ oluceps ];
|
|
};
|
|
}
|