nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 71 lines 1.4 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, Security 5, cmake 6, pkg-config 7, asio 8, nettle 9, gnutls 10, msgpack 11, readline 12, libargon2 13, jsoncpp 14, restinio 15, http-parser 16, openssl 17, fmt 18, enableProxyServerAndClient ? false 19, enablePushNotifications ? false 20}: 21 22stdenv.mkDerivation rec { 23 pname = "opendht"; 24 version = "2.4.0"; 25 26 src = fetchFromGitHub { 27 owner = "savoirfairelinux"; 28 repo = "opendht"; 29 rev = version; 30 sha256 = "sha256-vfMzUzTfz8G+E4W/1pX5v2P0RntgSTR61urmxtsrOWM="; 31 }; 32 33 nativeBuildInputs = [ 34 cmake 35 pkg-config 36 ]; 37 38 buildInputs = [ 39 asio 40 nettle 41 gnutls 42 msgpack 43 readline 44 libargon2 45 ] ++ lib.optionals enableProxyServerAndClient [ 46 jsoncpp 47 restinio 48 http-parser 49 openssl 50 fmt 51 ] ++ lib.optionals stdenv.isDarwin [ 52 Security 53 ]; 54 55 cmakeFlags = lib.optionals enableProxyServerAndClient [ 56 "-DOPENDHT_PROXY_SERVER=ON" 57 "-DOPENDHT_PROXY_CLIENT=ON" 58 ] ++ lib.optionals enablePushNotifications [ 59 "-DOPENDHT_PUSH_NOTIFICATIONS=ON" 60 ]; 61 62 outputs = [ "out" "lib" "dev" "man" ]; 63 64 meta = with lib; { 65 description = "A C++11 Kademlia distributed hash table implementation"; 66 homepage = "https://github.com/savoirfairelinux/opendht"; 67 license = licenses.gpl3Plus; 68 maintainers = with maintainers; [ taeer olynch thoughtpolice ]; 69 platforms = platforms.unix; 70 }; 71}