2021-10-08 16:18:30 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, Security
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, asio
|
|
|
|
, nettle
|
|
|
|
, gnutls
|
|
|
|
, msgpack
|
|
|
|
, readline
|
|
|
|
, libargon2
|
|
|
|
, jsoncpp
|
|
|
|
, restinio
|
|
|
|
, http-parser
|
|
|
|
, openssl
|
|
|
|
, fmt
|
|
|
|
, enableProxyServerAndClient ? false
|
|
|
|
, enablePushNotifications ? false
|
2017-07-11 19:00:07 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "opendht";
|
2022-03-27 16:11:58 +02:00
|
|
|
version = "2.4.0";
|
2017-07-11 19:00:07 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "savoirfairelinux";
|
|
|
|
repo = "opendht";
|
2019-09-09 01:38:31 +02:00
|
|
|
rev = version;
|
2022-03-27 16:11:58 +02:00
|
|
|
sha256 = "sha256-vfMzUzTfz8G+E4W/1pX5v2P0RntgSTR61urmxtsrOWM=";
|
2017-07-11 19:00:07 +02:00
|
|
|
};
|
|
|
|
|
2021-10-08 16:18:30 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2017-07-11 19:00:07 +02:00
|
|
|
|
2021-10-08 16:18:30 +02:00
|
|
|
buildInputs = [
|
|
|
|
asio
|
|
|
|
nettle
|
|
|
|
gnutls
|
|
|
|
msgpack
|
|
|
|
readline
|
|
|
|
libargon2
|
|
|
|
] ++ lib.optionals enableProxyServerAndClient [
|
|
|
|
jsoncpp
|
|
|
|
restinio
|
|
|
|
http-parser
|
|
|
|
openssl
|
|
|
|
fmt
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Security
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals enableProxyServerAndClient [
|
|
|
|
"-DOPENDHT_PROXY_SERVER=ON"
|
|
|
|
"-DOPENDHT_PROXY_CLIENT=ON"
|
|
|
|
] ++ lib.optionals enablePushNotifications [
|
|
|
|
"-DOPENDHT_PUSH_NOTIFICATIONS=ON"
|
|
|
|
];
|
2018-08-31 00:10:39 +02:00
|
|
|
|
|
|
|
outputs = [ "out" "lib" "dev" "man" ];
|
2017-07-11 19:00:07 +02:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2017-07-11 19:00:07 +02:00
|
|
|
description = "A C++11 Kademlia distributed hash table implementation";
|
2021-10-08 16:18:30 +02:00
|
|
|
homepage = "https://github.com/savoirfairelinux/opendht";
|
|
|
|
license = licenses.gpl3Plus;
|
2018-08-31 00:10:39 +02:00
|
|
|
maintainers = with maintainers; [ taeer olynch thoughtpolice ];
|
2021-10-08 16:18:30 +02:00
|
|
|
platforms = platforms.unix;
|
2017-07-11 19:00:07 +02:00
|
|
|
};
|
|
|
|
}
|