nixpkgs/pkgs/tools/networking/shadowsocks-rust/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security, CoreServices }:
2019-03-02 00:59:49 +00:00
rustPlatform.buildRustPackage rec {
pname = "shadowsocks-rust";
2024-03-14 01:08:33 +00:00
version = "1.18.2";
2019-03-02 00:59:49 +00:00
src = fetchFromGitHub {
rev = "v${version}";
owner = "shadowsocks";
repo = pname;
2024-03-14 01:08:33 +00:00
hash = "sha256-wbbh4IpAla3I/xgmiuzy9E9npS/PUtRFCZS4dl7JYRQ=";
2019-03-02 00:59:49 +00:00
};
2024-03-14 01:08:33 +00:00
cargoHash = "sha256-TPW+dic9KdtGXGlcEi7YAmt442ZJRifumnrmcX8+unM=";
2020-05-15 09:20:00 +00:00
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
2019-03-02 00:59:49 +00:00
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
++ lib.optionals stdenv.isDarwin [ Security CoreServices ];
buildFeatures = [
"trust-dns"
"local-http-native-tls"
"local-tunnel"
"local-socks4"
"local-redir"
"local-dns"
"local-tun"
"aead-cipher-extra"
"aead-cipher-2022"
"aead-cipher-2022-extra"
];
2021-11-01 05:18:57 +00:00
# all of these rely on connecting to www.example.com:80
checkFlags = [
"--skip=http_proxy"
"--skip=tcp_tunnel"
"--skip=tcprelay"
2021-11-01 05:18:57 +00:00
"--skip=udp_tunnel"
"--skip=udp_relay"
"--skip=socks4_relay_connect"
"--skip=socks5_relay_aead"
"--skip=socks5_relay_stream"
"--skip=trust_dns_resolver"
2021-11-01 05:18:57 +00:00
];
2019-03-02 00:59:49 +00:00
# timeouts in sandbox
doCheck = false;
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";
2019-03-02 00:59:49 +00:00
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}