2016-07-09 23:07:08 +00:00
|
|
|
{ withMbedTLS ? true
|
2016-06-03 10:27:27 +00:00
|
|
|
, enableSystemSharedLib ? true
|
2016-02-19 08:25:57 +00:00
|
|
|
, stdenv, fetchurl, zlib
|
|
|
|
, openssl ? null
|
2016-07-09 23:07:08 +00:00
|
|
|
, mbedtls ? null
|
2016-06-03 10:27:27 +00:00
|
|
|
, libev ? null
|
|
|
|
, libsodium ? null
|
|
|
|
, udns ? null
|
2016-07-30 00:20:56 +00:00
|
|
|
, asciidoc
|
|
|
|
, xmlto
|
|
|
|
, docbook_xml_dtd_45
|
|
|
|
, docbook_xsl
|
|
|
|
, libxslt
|
2016-10-16 14:39:12 +00:00
|
|
|
, pcre
|
2016-02-19 08:25:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2016-10-16 14:39:12 +00:00
|
|
|
version = "2.5.5";
|
|
|
|
sha256 = "46a72367b7301145906185f1e4136e39d6792d27643826e409ab708351b6d0dd";
|
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;
|
|
|
|
};
|
|
|
|
|
2016-10-16 14:39:12 +00:00
|
|
|
buildInputs = [ zlib asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt pcre ]
|
2016-07-09 23:07:08 +00:00
|
|
|
++ optional (!withMbedTLS) openssl
|
|
|
|
++ optional withMbedTLS mbedtls
|
2016-08-30 15:48:43 +00:00
|
|
|
++ optionals enableSystemSharedLib [libev libsodium udns];
|
2016-02-19 08:25:57 +00:00
|
|
|
|
2016-07-09 23:07:08 +00:00
|
|
|
configureFlags = optional withMbedTLS
|
|
|
|
[ "--with-crypto-library=mbedtls"
|
|
|
|
"--with-mbedtls=${mbedtls}"
|
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
|
|
|
};
|
|
|
|
}
|