opendht: support proxy

This commit is contained in:
linsui 2021-10-08 22:18:30 +08:00
parent 234ca69edd
commit 57a1b8476b
2 changed files with 52 additions and 21 deletions

View File

@ -1,6 +1,22 @@
{ lib, stdenv, fetchFromGitHub, darwin
, cmake, pkg-config
, asio, nettle, gnutls, msgpack, readline, libargon2
{ lib
, stdenv
, fetchFromGitHub
, Security
, cmake
, pkg-config
, asio
, nettle
, gnutls
, msgpack
, readline
, libargon2
, jsoncpp
, restinio
, http-parser
, openssl
, fmt
, enableProxyServerAndClient ? false
, enablePushNotifications ? false
}:
stdenv.mkDerivation rec {
@ -14,20 +30,33 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Os5PRYTZMVekQrbwNODWsHANTx6RSC5vzGJ5JoYtvtE=";
};
nativeBuildInputs =
[ cmake
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs =
[ asio
buildInputs = [
asio
nettle
gnutls
msgpack
readline
libargon2
] ++ lib.optionals enableProxyServerAndClient [
jsoncpp
restinio
http-parser
openssl
fmt
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
Security
];
cmakeFlags = lib.optionals enableProxyServerAndClient [
"-DOPENDHT_PROXY_SERVER=ON"
"-DOPENDHT_PROXY_CLIENT=ON"
] ++ lib.optionals enablePushNotifications [
"-DOPENDHT_PUSH_NOTIFICATIONS=ON"
];
outputs = [ "out" "lib" "dev" "man" ];

View File

@ -7942,7 +7942,9 @@ with pkgs;
opendbx = callPackage ../development/libraries/opendbx { };
opendht = callPackage ../development/libraries/opendht {};
opendht = callPackage ../development/libraries/opendht {
inherit (darwin.apple_sdk.frameworks) Security;
};
opendkim = callPackage ../development/libraries/opendkim { };