1 { lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, CoreServices, libiconv }:
3 rustPlatform.buildRustPackage rec {
4 pname = "shadowsocks-rust";
7 src = fetchFromGitHub {
11 sha256 = "sha256-tRiziyCw1Qpm22RtZHeKt4VFReJidFHsPxPSjxIA3hA=";
14 cargoSha256 = "sha256-snnzNb1yJ8L5pMvNNEIf5hZOpFV6DKOWGtGP1T3YTWg=";
18 nativeBuildInputs = [ pkg-config ];
20 buildInputs = [ openssl ]
21 ++ lib.optionals stdenv.isDarwin [ CoreServices libiconv ];
24 "--features=aead-cipher-extra,local-dns,local-http-native-tls,local-redir,local-tun"
27 # all of these rely on connecting to www.example.com:80
33 "--skip=socks4_relay_connect"
34 "--skip=socks5_relay_aead"
35 "--skip=socks5_relay_stream"
39 homepage = "https://github.com/shadowsocks/shadowsocks-rust";
40 description = "A Rust port of shadowsocks";
41 license = licenses.mit;
42 maintainers = [ maintainers.marsam ];