18 , enableProxyServerAndClient ? false
19 , enablePushNotifications ? false
22 stdenv.mkDerivation rec {
26 src = fetchFromGitHub {
27 owner = "savoirfairelinux";
30 hash = "sha256-s172Sj1EvV7Lmnmd+xyKmYF2cDEa8Bot10ovggEsOFg=";
46 ] ++ lib.optionals enableProxyServerAndClient [
51 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
55 cmakeFlags = lib.optionals enableProxyServerAndClient [
56 "-DOPENDHT_PROXY_SERVER=ON"
57 "-DOPENDHT_PROXY_CLIENT=ON"
58 ] ++ lib.optionals enablePushNotifications [
59 "-DOPENDHT_PUSH_NOTIFICATIONS=ON"
62 # https://github.com/savoirfairelinux/opendht/issues/612
64 substituteInPlace CMakeLists.txt \
65 --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
66 --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
69 outputs = [ "out" "lib" "dev" "man" ];
72 description = "C++11 Kademlia distributed hash table implementation";
73 homepage = "https://github.com/savoirfairelinux/opendht";
74 license = licenses.gpl3Plus;
75 maintainers = with maintainers; [ taeer olynch thoughtpolice ];
76 platforms = platforms.unix;