depot/third_party/nixpkgs/pkgs/tools/networking/hysteria/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

39 lines
845 B
Nix

{ lib
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "hysteria";
version = "1.3.0";
src = fetchFromGitHub {
owner = "HyNetwork";
repo = pname;
rev = "v${version}";
sha256 = "sha256-WQpObXUZBVzRzFSiNNea0tRX0s0+a8qn4NacEaUBwaA=";
};
vendorSha256 = "sha256-ww7JtTfyN0/ziQ2jLXRgMhnpx0vFozdSTKe7I129Hvg=";
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 ];
};
}