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-12 18:23:04 +00:00
|
|
|
version = "1.10.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "shadowsocks";
|
|
|
|
repo = pname;
|
2021-04-12 18:23:04 +00:00
|
|
|
sha256 = "0nagn7792qniczzv0912h89bn8rm8hyikdiw7cqwknx0hw8dwz1z";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
cargoSha256 = "0arqc0wnvfkmk8xzsdc6fvd1adazrw950ld8xyh7r588pyphjmhn";
|
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
|
|
|
};
|
|
|
|
}
|