6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
43 lines
1.3 KiB
Nix
43 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security, CoreServices }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "shadowsocks-rust";
|
|
version = "1.15.2";
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "v${version}";
|
|
owner = "shadowsocks";
|
|
repo = pname;
|
|
hash = "sha256-CvAOvtC5U2njQuUjFxjnGeqhuxrCw4XI6goo1TxIhIU=";
|
|
};
|
|
|
|
cargoHash = "sha256-ctZlYo82M7GKVvrEkw/7+aH9R0MeEsyv3IKl9k4SbiA=";
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
|
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
|
|
++ lib.optionals stdenv.isDarwin [ Security CoreServices ];
|
|
|
|
cargoBuildFlags = [
|
|
"--features=aead-cipher-extra,local-dns,local-http-native-tls,local-redir,local-tun"
|
|
];
|
|
|
|
# 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; {
|
|
description = "A Rust port of Shadowsocks";
|
|
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
|
|
changelog = "https://github.com/shadowsocks/shadowsocks-rust/raw/v${version}/debian/changelog";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.marsam ];
|
|
};
|
|
}
|