2021-03-06 10:00:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, libiconv }:
|
2019-03-02 00:59:49 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "shadowsocks-rust";
|
2022-02-13 20:18:07 +00:00
|
|
|
version = "1.13.2";
|
2019-03-02 00:59:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "shadowsocks";
|
|
|
|
repo = pname;
|
2022-02-13 20:18:07 +00:00
|
|
|
sha256 = "sha256-4lOEft1uiGN7OgFQzSn+QV8/wHl+W2yM3RAc5t8bUtk=";
|
2019-03-02 00:59:49 +00:00
|
|
|
};
|
|
|
|
|
2022-02-13 20:18:07 +00:00
|
|
|
cargoSha256 = "sha256-NKq/lnpGrCLZjWdKquysoi25SsFtmtDrPIioDgQoMjw=";
|
2020-05-15 09:20:00 +00:00
|
|
|
|
2021-02-23 04:20:00 +00:00
|
|
|
RUSTC_BOOTSTRAP = 1;
|
2019-03-02 00:59:49 +00:00
|
|
|
|
2021-03-06 10:00:00 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices libiconv ];
|
2021-02-23 04:20:00 +00:00
|
|
|
|
2021-11-01 05:18:57 +00:00
|
|
|
# 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"
|
|
|
|
];
|
2019-03-02 00:59:49 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
|
2019-03-02 00:59:49 +00:00
|
|
|
description = "A Rust port of shadowsocks";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|