crun: 1.8.3 -> 1.8.4
[NixPkgs.git] / pkgs / tools / networking / shadowsocks-rust / default.nix
blobe16a359c12a3ab5e1fdf89d1185a282d28b6ffb5
1 { lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security, CoreServices }:
3 rustPlatform.buildRustPackage rec {
4   pname = "shadowsocks-rust";
5   version = "1.15.3";
7   src = fetchFromGitHub {
8     rev = "v${version}";
9     owner = "shadowsocks";
10     repo = pname;
11     hash = "sha256-HU+9y4btWbYrkHazOudY2j9RceieBK3BS2jgLbwcEdk=";
12   };
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 ];
21   buildFeatures = [
22     "trust-dns"
23     "local-http-native-tls"
24     "local-tunnel"
25     "local-socks4"
26     "local-redir"
27     "local-dns"
28     "local-tun"
29     "aead-cipher-extra"
30     "aead-cipher-2022"
31     "aead-cipher-2022-extra"
32   ];
34   # all of these rely on connecting to www.example.com:80
35   checkFlags = [
36     "--skip=http_proxy"
37     "--skip=tcp_tunnel"
38     "--skip=udp_tunnel"
39     "--skip=udp_relay"
40     "--skip=socks4_relay_connect"
41     "--skip=socks5_relay_aead"
42     "--skip=socks5_relay_stream"
43   ];
45   meta = with lib; {
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 ];
51   };