2016-02-19 08:25:57 +00:00
|
|
|
{ withPolarSSL ? false
|
2016-06-03 10:27:27 +00:00
|
|
|
, enableSystemSharedLib ? true
|
2016-02-19 08:25:57 +00:00
|
|
|
, stdenv, fetchurl, zlib
|
|
|
|
, openssl ? null
|
|
|
|
, polarssl ? null
|
2016-06-03 10:27:27 +00:00
|
|
|
, libev ? null
|
|
|
|
, libsodium ? null
|
|
|
|
, udns ? null
|
2016-02-19 08:25:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2016-06-03 10:27:27 +00:00
|
|
|
version = "2.4.7";
|
|
|
|
sha256 = "957265cc5339e020d8c8bb7414ab14936e3939dc7355f334aec896ec9b03c6ed";
|
2016-02-19 08:25:57 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
|
2016-06-03 10:27:27 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2016-02-19 08:25:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "shadowsocks-libev-${version}";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/shadowsocks/shadowsocks-libev/archive/v${version}.tar.gz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ]
|
2016-06-03 10:27:27 +00:00
|
|
|
++ optional (!withPolarSSL) openssl
|
|
|
|
++ optional withPolarSSL polarssl
|
|
|
|
++ optional enableSystemSharedLib [libev libsodium udns];
|
2016-02-19 08:25:57 +00:00
|
|
|
|
2016-06-03 10:27:27 +00:00
|
|
|
configureFlags = optional withPolarSSL
|
2016-02-19 08:25:57 +00:00
|
|
|
[ "--with-crypto-library=polarssl"
|
|
|
|
"--with-polarssl=${polarssl}"
|
2016-06-03 10:27:27 +00:00
|
|
|
]
|
|
|
|
++ optional enableSystemSharedLib "--enable-system-shared-lib";
|
2016-02-19 08:25:57 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A lightweight secured SOCKS5 proxy";
|
|
|
|
longDescription = ''
|
|
|
|
Shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and low-end boxes.
|
|
|
|
It is a port of Shadowsocks created by @clowwindy, which is maintained by @madeye and @linusyang.
|
|
|
|
'';
|
|
|
|
homepage = https://github.com/shadowsocks/shadowsocks-libev;
|
2016-06-03 10:27:27 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.nfjinjing ];
|
|
|
|
platforms = platforms.all;
|
2016-02-19 08:25:57 +00:00
|
|
|
};
|
|
|
|
}
|