mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 00:54:11 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
41 lines
1.3 KiB
Nix
41 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake
|
|
, libsodium, mbedtls, libev, c-ares, pcre
|
|
, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "shadowsocks-libev";
|
|
version = "3.3.5";
|
|
|
|
# Git tag includes CMake build files which are much more convenient.
|
|
src = fetchFromGitHub {
|
|
owner = "shadowsocks";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "1iqpmhxk354db1x08axg6wrdy9p9a4mz0h9351i3mf3pqd1v6fdw";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
buildInputs = [ libsodium mbedtls libev c-ares pcre ];
|
|
nativeBuildInputs = [ cmake asciidoc xmlto docbook_xml_dtd_45
|
|
docbook_xsl libxslt ];
|
|
|
|
cmakeFlags = [ "-DWITH_STATIC=OFF" "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ];
|
|
|
|
postInstall = ''
|
|
cp lib/* $out/lib
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.nfjinjing ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|