depot/third_party/nixpkgs/pkgs/tools/networking/shadowsocks-rust/default.nix
Default email a6d62be0d1 Project import generated by Copybara.
GitOrigin-RevId: ac169ec6371f0d835542db654a65e0f2feb07838
2021-12-26 18:43:05 +01:00

37 lines
988 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "shadowsocks-rust";
version = "1.12.5";
src = fetchFromGitHub {
rev = "v${version}";
owner = "shadowsocks";
repo = pname;
sha256 = "sha256-whPaFb+4mYOWmtFc/a+NkH9avCfOnGnAvqz3UFTt+RY=";
};
cargoSha256 = "sha256-w7AqNsa9lolPEiHEv7E4XGaFV/UbCeYvmWekr9YzO6Q=";
RUSTC_BOOTSTRAP = 1;
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices libiconv ];
# all of these rely on connecting to www.example.com:80
checkFlags = [
"--skip=http_proxy"
"--skip=tcp_tunnel"
"--skip=udp_tunnel"
"--skip=udp_relay"
"--skip=socks4_relay_connect"
"--skip=socks5_relay_aead"
"--skip=socks5_relay_stream"
];
meta = with lib; {
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
description = "A Rust port of shadowsocks";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}