2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
39 lines
841 B
Nix
39 lines
841 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "hysteria";
|
|
version = "2.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "apernet";
|
|
repo = pname;
|
|
rev = "app/v${version}";
|
|
hash = "sha256-v9W1/1AIcYKYxVnFFXZdwQC50FWJCMQ0OXCmlfmXWQk=";
|
|
};
|
|
|
|
vendorHash = "sha256-/lFDCOkwkBKq1GJA1F7Lyhw++X1G1pld6JXNEdKue/E=";
|
|
proxyVendor = true;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.appVersion=${version}"
|
|
];
|
|
|
|
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.linux;
|
|
maintainers = with maintainers; [ oluceps ];
|
|
};
|
|
}
|