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

55 lines
1.5 KiB
Nix
Raw Normal View History

{ withMbedTLS ? true
2016-06-03 12:27:27 +02:00
, enableSystemSharedLib ? true
2016-02-19 09:25:57 +01:00
, stdenv, fetchurl, zlib
, openssl ? null
, mbedtls ? null
2016-06-03 12:27:27 +02:00
, libev ? null
, libsodium ? null
, udns ? null
, asciidoc
, xmlto
, docbook_xml_dtd_45
, docbook_xsl
, libxslt
2016-02-19 09:25:57 +01:00
}:
let
version = "2.4.8";
sha256 = "af3fc3be50fb24dfd1aed8ce34d2d13448735f6181269f54f4860438a1838472";
2016-02-19 09:25:57 +01:00
in
2016-06-03 12:27:27 +02:00
with stdenv.lib;
2016-02-19 09:25:57 +01: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 asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt ]
++ optional (!withMbedTLS) openssl
++ optional withMbedTLS mbedtls
2016-06-03 12:27:27 +02:00
++ optional enableSystemSharedLib [libev libsodium udns];
2016-02-19 09:25:57 +01:00
configureFlags = optional withMbedTLS
[ "--with-crypto-library=mbedtls"
"--with-mbedtls=${mbedtls}"
2016-06-03 12:27:27 +02:00
]
++ optional enableSystemSharedLib "--enable-system-shared-lib";
2016-02-19 09:25:57 +01: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 12:27:27 +02:00
license = licenses.gpl3Plus;
maintainers = [ maintainers.nfjinjing ];
platforms = platforms.all;
2016-02-19 09:25:57 +01:00
};
}