nixpkgs/pkgs/development/libraries/opendht/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

72 lines
1.3 KiB
Nix
Raw Normal View History

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 {
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"
];
outputs = [ "out" "lib" "dev" "man" ];
2017-07-11 19:00:07 +02: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;
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
};
}