1 # Nix package for GNUnet development
5 # To build and install the package in the user environment, use:
11 # To build the package and add it to the nix store, use:
17 # To launch a shell with all dependencies installed in the environment, use one of the following:
20 # After entering nix-shell, build it:
27 # For all of the above commands, nixpkgs to use can be set the following way:
29 # a) by default it uses nixpkgs pinned to a known working version
31 # b) use nixpkgs from the system:
34 # c) use nixpkgs at a given path
35 # --args pkgs /path/to/nixpkgs
41 syspkgs = import <nixpkgs> { };
42 pinpkgs = syspkgs.fetchFromGitHub {
46 # binary cache exists for revisions in https://nixos.org/releases/nixos/<release>/<build>/git-revision
47 rev = "c4469edac1fc1fa5e5b5aa2ceadeda8f3f92d30a"; # https://nixos.org/releases/nixos/16.09/nixos-16.09beta430.c4469ed/git-revision
48 sha256 = "1x6hmf815d5anfxrxl6iivfkk60q5qxa6waa9xnwhwkbc14rhvn9";
50 usepkgs = if null == pkgs then
58 in with usepkgs; usepkgs.stdenv.mkDerivation rec {
64 adns curl gettext gmp gnutls gss ncurses openldap zlib sqlite mariadb postgresql
65 libextractor libgcrypt libgnurl libidn libmicrohttpd
66 libpsl libtool libunistring libxml2
70 test -e Makefile && make distclean
74 "--enable-gcc-hardening"
75 "--enable-linker-hardening"
77 "--enable-experimental"
78 "--enable-logging=verbose"
84 configureFlags="$configureFlags --with-nssdir=$out/lib"
90 # Tests can be run this way
91 #export GNUNET_PREFIX="$out"
92 #export PATH="$out/bin:$PATH"
96 meta = with stdenv.lib; {
97 description = "GNU's decentralized anonymous and censorship-resistant P2P framework";
100 GNUnet is a framework for secure peer-to-peer networking that
101 does not use any centralized or otherwise trusted services. A
102 first service implemented on top of the networking layer
103 allows anonymous censorship-resistant file-sharing. Anonymity
104 is provided by making messages originating from a peer
105 indistinguishable from messages that the peer is routing. All
106 peers act as routers and use link-encrypted connections with
107 stable bandwidth utilization to communicate with each other.
108 GNUnet uses a simple, excess-based economic model to allocate
109 resources. Peers in GNUnet monitor each others behavior with
110 respect to resource usage; peers that contribute to the
111 network are rewarded with better service.
114 homepage = http://gnunet.org/;
116 license = licenses.gpl3Plus;
117 platforms = platforms.gnu;
118 maintainers = with maintainers; [ ];