nerdfonts: fix wrong attribute name in error message (#364463)
[NixPkgs.git] / pkgs / development / libraries / opendht / default.nix
blobe7408ba37e67250680985f727edcd0c23d755983
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , Security
5 , cmake
6 , pkg-config
7 , asio
8 , nettle
9 , gnutls
10 , msgpack-cxx
11 , readline
12 , libargon2
13 , jsoncpp
14 , restinio
15 , http-parser
16 , openssl
17 , fmt
18 , enableProxyServerAndClient ? false
19 , enablePushNotifications ? false
22 stdenv.mkDerivation rec {
23   pname = "opendht";
24   version = "3.2.0";
26   src = fetchFromGitHub {
27     owner = "savoirfairelinux";
28     repo = "opendht";
29     rev = "v${version}";
30     hash = "sha256-s172Sj1EvV7Lmnmd+xyKmYF2cDEa8Bot10ovggEsOFg=";
31   };
33   nativeBuildInputs = [
34     cmake
35     pkg-config
36   ];
38   buildInputs = [
39     asio
40     fmt
41     nettle
42     gnutls
43     msgpack-cxx
44     readline
45     libargon2
46   ] ++ lib.optionals enableProxyServerAndClient [
47     jsoncpp
48     restinio
49     http-parser
50     openssl
51   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
52     Security
53   ];
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   ];
62   # https://github.com/savoirfairelinux/opendht/issues/612
63   postPatch = ''
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}
67   '';
69   outputs = [ "out" "lib" "dev" "man" ];
71   meta = with lib; {
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;
77   };