opendht: 3.2.0 -> 3.4.0 (#410596)

This commit is contained in:
Arne Keller
2025-05-27 12:01:45 +02:00
committed by GitHub
+19 -11
View File
@@ -15,21 +15,32 @@
llhttp,
openssl,
fmt,
fetchpatch2,
nix-update-script,
enableProxyServerAndClient ? false,
enablePushNotifications ? false,
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "opendht";
version = "3.2.0-unstable-2025-01-05";
version = "3.4.0";
src = fetchFromGitHub {
owner = "savoirfairelinux";
repo = "opendht";
rev = "5237f0a3b3eb8965f294de706ad73596569ae1dd";
hash = "sha256-qErVKyZQR/asJ8qr0sRDaXZ8jUV7RaSLnJka5baWa7Q=";
tag = "v${version}";
hash = "sha256-WNN4aCZiJuz9CgEKIzFmy50HBj0ZL/d1uU7L518lPhk=";
};
patches = lib.optionals enableProxyServerAndClient [
# Remove this patch when switching to using shared llhttp
(fetchpatch2 {
url = "https://github.com/savoirfairelinux/opendht/commit/2bc46e9657c94adcce2479807a0a04c2f783bd4e.patch?full_index=1";
hash = "sha256-znft836nPx8uvfHm0fQE9h+l5G006Im6IJOrsmElx6w=";
revert = true;
})
];
nativeBuildInputs = [
cmake
pkg-config
@@ -61,13 +72,6 @@ stdenv.mkDerivation {
"-DOPENDHT_PUSH_NOTIFICATIONS=ON"
];
# https://github.com/savoirfairelinux/opendht/issues/612
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
outputs = [
"out"
"lib"
@@ -75,6 +79,10 @@ stdenv.mkDerivation {
"man"
];
passthru.updateScript = nix-update-script {
extraArgs = [ "--version-regex=v(.+)" ];
};
meta = with lib; {
description = "C++11 Kademlia distributed hash table implementation";
homepage = "https://github.com/savoirfairelinux/opendht";