Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opendht: 3.2.0 -> 3.2.0-unstable-2024-11-06 #356718

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 62 additions & 47 deletions pkgs/development/libraries/opendht/default.nix
Original file line number Diff line number Diff line change
@@ -1,63 +1,69 @@
{ lib
, stdenv
, fetchFromGitHub
, Security
, cmake
, pkg-config
, asio
, nettle
, gnutls
, msgpack-cxx
, readline
, libargon2
, jsoncpp
, restinio
, http-parser
, 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 rec {
stdenv.mkDerivation {
pname = "opendht";
version = "3.2.0";
version = "3.2.0-unstable-2025-01-05";

src = fetchFromGitHub {
owner = "savoirfairelinux";
repo = "opendht";
rev = "v${version}";
hash = "sha256-s172Sj1EvV7Lmnmd+xyKmYF2cDEa8Bot10ovggEsOFg=";
rev = "5237f0a3b3eb8965f294de706ad73596569ae1dd";
hash = "sha256-qErVKyZQR/asJ8qr0sRDaXZ8jUV7RaSLnJka5baWa7Q=";
};

nativeBuildInputs = [
cmake
pkg-config
];

buildInputs = [
asio
fmt
nettle
gnutls
msgpack-cxx
readline
libargon2
] ++ lib.optionals enableProxyServerAndClient [
jsoncpp
restinio
http-parser
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 = ''
Expand All @@ -66,13 +72,22 @@ stdenv.mkDerivation rec {
--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;
};
}