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

72 lines
1.3 KiB
Nix
Raw Normal View History

2021-10-08 14:18:30 +00: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 17:00:07 +00:00
}:
stdenv.mkDerivation rec {
pname = "opendht";
2021-09-16 15:13:36 +00:00
version = "2.3.1";
2017-07-11 17:00:07 +00:00
src = fetchFromGitHub {
owner = "savoirfairelinux";
repo = "opendht";
2019-09-08 23:38:31 +00:00
rev = version;
2021-09-16 15:13:36 +00:00
sha256 = "sha256-Os5PRYTZMVekQrbwNODWsHANTx6RSC5vzGJ5JoYtvtE=";
2017-07-11 17:00:07 +00:00
};
2021-10-08 14:18:30 +00:00
nativeBuildInputs = [
cmake
pkg-config
];
2017-07-11 17:00:07 +00:00
2021-10-08 14:18:30 +00: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 17:00:07 +00:00
meta = with lib; {
2017-07-11 17:00:07 +00:00
description = "A C++11 Kademlia distributed hash table implementation";
2021-10-08 14:18:30 +00:00
homepage = "https://github.com/savoirfairelinux/opendht";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ taeer olynch thoughtpolice ];
2021-10-08 14:18:30 +00:00
platforms = platforms.unix;
2017-07-11 17:00:07 +00:00
};
}