2
0

gnunet-dev.nix 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. { stdenv, makeWrapper, pkgconfig, autoconf, automake, ccache, ccache_dir ? ""
  2. , adns, curl, gettext, gmp, gnutls, gss, ncurses, openldap
  3. , jansson, zlib, sqlite, mariadb, postgresql
  4. , libextractor, libgcrypt, libgnurl, libidn, libmicrohttpd
  5. , libpsl, libtool, libunistring, libxml2
  6. }:
  7. stdenv.mkDerivation rec {
  8. src = ./.;
  9. name = "gnunet-dev";
  10. buildInputs = [
  11. makeWrapper pkgconfig autoconf automake ccache
  12. adns curl gettext gmp gnutls gss ncurses openldap
  13. jansson zlib sqlite mariadb postgresql
  14. libextractor libgcrypt libgnurl libidn libmicrohttpd
  15. libpsl libtool libunistring libxml2
  16. ];
  17. patchPhase = ''
  18. if [ -e Makefile ]; then
  19. make distclean
  20. fi
  21. '';
  22. NIX_CFLAGS_COMPILE = "-ggdb -O0";
  23. configureFlags = [
  24. "--enable-gcc-hardening"
  25. "--enable-linker-hardening"
  26. "--enable-poisoning"
  27. "--enable-sanitizer"
  28. "--enable-experimental"
  29. "--enable-logging=verbose"
  30. ];
  31. preConfigure = ''
  32. ./bootstrap
  33. configureFlags="$configureFlags --with-nssdir=$out/lib"
  34. if [ -n "${ccache_dir}" ]; then
  35. export CC='ccache gcc'
  36. export CCACHE_COMPRESS=1
  37. export CCACHE_DIR="${ccache_dir}"
  38. export CCACHE_UMASK=007
  39. fi
  40. '';
  41. doCheck = false;
  42. postInstall = ''
  43. # Tests can be run this way
  44. #export GNUNET_PREFIX="$out"
  45. #export PATH="$out/bin:$PATH"
  46. #make -k check
  47. '';
  48. meta = with stdenv.lib; {
  49. description = "GNU's decentralized anonymous and censorship-resistant P2P framework";
  50. longDescription = ''
  51. GNUnet is a framework for secure peer-to-peer networking that
  52. does not use any centralized or otherwise trusted services. A
  53. first service implemented on top of the networking layer
  54. allows anonymous censorship-resistant file-sharing. Anonymity
  55. is provided by making messages originating from a peer
  56. indistinguishable from messages that the peer is routing. All
  57. peers act as routers and use link-encrypted connections with
  58. stable bandwidth utilization to communicate with each other.
  59. GNUnet uses a simple, excess-based economic model to allocate
  60. resources. Peers in GNUnet monitor each others behavior with
  61. respect to resource usage; peers that contribute to the
  62. network are rewarded with better service.
  63. '';
  64. homepage = https://gnunet.org/;
  65. license = licenses.gpl3Plus;
  66. platforms = platforms.gnu;
  67. maintainers = with maintainers; [ ];
  68. };
  69. }