opendht: format

This commit is contained in:
linsui
2025-01-17 15:42:40 +08:00
parent c0d940b21b
commit d41c444e5b
+58 -43
View File
@@ -1,22 +1,23 @@
{ lib
, stdenv
, fetchFromGitHub
, Security
, cmake
, pkg-config
, asio
, nettle
, gnutls
, msgpack-cxx
, readline
, libargon2
, jsoncpp
, restinio
, llhttp
, openssl
, fmt
, enableProxyServerAndClient ? false
, enablePushNotifications ? false
{
lib,
stdenv,
fetchFromGitHub,
Security,
cmake,
pkg-config,
asio,
nettle,
gnutls,
msgpack-cxx,
readline,
libargon2,
jsoncpp,
restinio,
llhttp,
openssl,
fmt,
enableProxyServerAndClient ? false,
enablePushNotifications ? false,
}:
stdenv.mkDerivation {
@@ -35,29 +36,34 @@ stdenv.mkDerivation {
pkg-config
];
buildInputs = [
asio
fmt
nettle
gnutls
msgpack-cxx
readline
libargon2
] ++ lib.optionals enableProxyServerAndClient [
jsoncpp
restinio
llhttp
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Security
];
buildInputs =
[
asio
fmt
nettle
gnutls
msgpack-cxx
readline
libargon2
]
++ lib.optionals enableProxyServerAndClient [
jsoncpp
restinio
llhttp
openssl
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Security
];
cmakeFlags = lib.optionals enableProxyServerAndClient [
"-DOPENDHT_PROXY_SERVER=ON"
"-DOPENDHT_PROXY_CLIENT=ON"
] ++ lib.optionals enablePushNotifications [
"-DOPENDHT_PUSH_NOTIFICATIONS=ON"
];
cmakeFlags =
lib.optionals enableProxyServerAndClient [
"-DOPENDHT_PROXY_SERVER=ON"
"-DOPENDHT_PROXY_CLIENT=ON"
]
++ lib.optionals enablePushNotifications [
"-DOPENDHT_PUSH_NOTIFICATIONS=ON"
];
# https://github.com/savoirfairelinux/opendht/issues/612
postPatch = ''
@@ -66,13 +72,22 @@ stdenv.mkDerivation {
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
outputs = [ "out" "lib" "dev" "man" ];
outputs = [
"out"
"lib"
"dev"
"man"
];
meta = with lib; {
description = "C++11 Kademlia distributed hash table implementation";
homepage = "https://github.com/savoirfairelinux/opendht";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ taeer olynch thoughtpolice ];
maintainers = with maintainers; [
taeer
olynch
thoughtpolice
];
platforms = platforms.unix;
};
}