1 { lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security, CoreServices }:
3 rustPlatform.buildRustPackage rec {
4 pname = "shadowsocks-rust";
7 src = fetchFromGitHub {
11 hash = "sha256-HU+9y4btWbYrkHazOudY2j9RceieBK3BS2jgLbwcEdk=";
14 cargoHash = "sha256-YORQHX4RPPHDErgo4c3SxvxklJ9mxHeP/1GiwhuL+J0=";
16 nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
18 buildInputs = lib.optionals stdenv.isLinux [ openssl ]
19 ++ lib.optionals stdenv.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
40 "--skip=socks4_relay_connect"
41 "--skip=socks5_relay_aead"
42 "--skip=socks5_relay_stream"
46 description = "A Rust port of Shadowsocks";
47 homepage = "https://github.com/shadowsocks/shadowsocks-rust";
48 changelog = "https://github.com/shadowsocks/shadowsocks-rust/raw/v${version}/debian/changelog";
49 license = licenses.mit;
50 maintainers = [ maintainers.marsam ];