1 { lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security, CoreServices }:
3 rustPlatform.buildRustPackage rec {
4 pname = "shadowsocks-rust";
7 src = fetchFromGitHub {
11 hash = "sha256-h18+233lxKNTRCRXUKYA4VzSfJy3ZHgU1KVZn7U36Z4=";
14 cargoHash = "sha256-rcLcbAH9f1xuLhvaZA9akg84o2E8G1CRfaAY0bWYby0=";
16 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
18 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
19 ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security CoreServices ];
23 "local-http-native-tls"
31 "aead-cipher-2022-extra"
34 # all of these rely on connecting to www.example.com:80
41 "--skip=socks4_relay_connect"
42 "--skip=socks5_relay_aead"
43 "--skip=socks5_relay_stream"
44 "--skip=trust_dns_resolver"
51 description = "Rust port of Shadowsocks";
52 homepage = "https://github.com/shadowsocks/shadowsocks-rust";
53 changelog = "https://github.com/shadowsocks/shadowsocks-rust/raw/v${version}/debian/changelog";
54 license = licenses.mit;