diff --git a/pkgs/by-name/sh/shadowsocks-libev/package.nix b/pkgs/by-name/sh/shadowsocks-libev/package.nix index 2a4d822a6068..f324d0cda36c 100644 --- a/pkgs/by-name/sh/shadowsocks-libev/package.nix +++ b/pkgs/by-name/sh/shadowsocks-libev/package.nix @@ -2,9 +2,10 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, libsodium, - mbedtls_2, + mbedtls, libev, c-ares, pcre, @@ -15,7 +16,7 @@ libxslt, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "shadowsocks-libev"; version = "3.3.5"; @@ -23,14 +24,21 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "shadowsocks"; repo = "shadowsocks-libev"; - tag = "v${version}"; - sha256 = "1iqpmhxk354db1x08axg6wrdy9p9a4mz0h9351i3mf3pqd1v6fdw"; + tag = "v${finalAttrs.version}"; + hash = "sha256-vDmzQ8N3uDpiKCNB8CtR6SbfMjevKwR6WI2UMTusF8c="; fetchSubmodules = true; }; + patches = [ + (fetchpatch { + url = "https://github.com/shadowsocks/shadowsocks-libev/commit/9afa3cacf947f910be46b69fc5a7a1fdd02fd5e6.patch"; + hash = "sha256-rpWXe8f95UU1DjQpbKMVMwA6r5yGVaDHwH/iWxW7wcw="; + }) + ]; + buildInputs = [ libsodium - mbedtls_2 + mbedtls libev c-ares pcre @@ -79,15 +87,15 @@ stdenv.mkDerivation rec { cp lib/* $out/lib ''; - meta = with lib; { + meta = { description = "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"; - license = licenses.gpl3Plus; + license = lib.licenses.gpl3Plus; maintainers = [ ]; - platforms = platforms.all; + platforms = lib.platforms.all; }; -} +})