nixpkgs/pkgs/tools/networking/hysteria/default.nix
2022-11-28 12:59:33 +08:00

39 lines
845 B
Nix

{ lib
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "hysteria";
version = "1.3.1";
src = fetchFromGitHub {
owner = "HyNetwork";
repo = pname;
rev = "v${version}";
sha256 = "sha256-va/2eCi7wu8YMKf/I0ZiDFAY/shaHA/boF1PCYFolwM=";
};
vendorSha256 = "sha256-a24NyJDatyM+j29vyY5zbPRhRTOGfa2c1FkZdKpDvxk=";
proxyVendor = true;
ldflags = [
"-s"
"-w"
"-X main.appVersion=${version}"
];
postInstall = ''
mv $out/bin/cmd $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/HyNetwork/hysteria";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ oluceps ];
};
}