From d41c444e5b409738e133454ec56cf3e6fde4ffdd Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:42:40 +0800 Subject: [PATCH] opendht: format --- .../development/libraries/opendht/default.nix | 101 ++++++++++-------- 1 file changed, 58 insertions(+), 43 deletions(-) diff --git a/pkgs/development/libraries/opendht/default.nix b/pkgs/development/libraries/opendht/default.nix index 42cd4744db02a..39478e3e92b20 100644 --- a/pkgs/development/libraries/opendht/default.nix +++ b/pkgs/development/libraries/opendht/default.nix @@ -1,22 +1,23 @@ -{ lib -, stdenv -, fetchFromGitHub -, Security -, cmake -, pkg-config -, asio -, nettle -, gnutls -, msgpack-cxx -, readline -, libargon2 -, jsoncpp -, restinio -, llhttp -, 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 { @@ -35,29 +36,34 @@ stdenv.mkDerivation { pkg-config ]; - buildInputs = [ - asio - fmt - nettle - gnutls - msgpack-cxx - readline - libargon2 - ] ++ lib.optionals enableProxyServerAndClient [ - jsoncpp - restinio - llhttp - 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 = '' @@ -66,13 +72,22 @@ stdenv.mkDerivation { --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; }; }