2021-03-09 03:18:52 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, libiconv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "shadowsocks-rust";
|
2021-04-05 15:23:46 +00:00
|
|
|
version = "1.10.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "shadowsocks";
|
|
|
|
repo = pname;
|
2021-04-05 15:23:46 +00:00
|
|
|
sha256 = "155v63v0wf0ky5nl2f1dvky8n9pdk40l1lqyz8l1i1kjcvvcmj26";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
cargoSha256 = "1vb6kis54g4lfc9d0h1961dclaqhq019iw509ydcsa1n7bp25caq";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
RUSTC_BOOTSTRAP = 1;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices libiconv ];
|
|
|
|
|
|
|
|
checkFlags = [ "--skip=http_proxy" "--skip=udp_tunnel" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
|
|
|
|
description = "A Rust port of shadowsocks";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
2021-03-09 03:18:52 +00:00
|
|
|
broken = stdenv.isAarch64; # crypto2 crate doesn't build on aarch64
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|