depot/third_party/nixpkgs/pkgs/tools/networking/hysteria/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

43 lines
974 B
Nix

{ lib
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "hysteria";
version = "2.4.3";
src = fetchFromGitHub {
owner = "apernet";
repo = pname;
rev = "app/v${version}";
hash = "sha256-4i3bXtg7WCSPDE7fUWVJnOOFNGLAo1F/a2wbuUH785o=";
};
vendorHash = "sha256-dV/bomGPg0Q3OEDuu6vRVsFRveDVzw6Hv0KLla2uZqc=";
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 ];
mainProgram = "hysteria";
};
}