aboutsummaryrefslogtreecommitdiff
path: root/gnunet-dev.nix
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2016-10-17 15:47:14 +0000
committerGabor X Toth <*@tg-x.net>2016-10-17 15:47:14 +0000
commit73515c3ba4c4e34e5d86d8342c8763a7c2782d7e (patch)
treef42bd212344b9af8d923bf5948f7ec6850602450 /gnunet-dev.nix
parentac2ddf1b41bca8c031dd19a1750355722839a5bb (diff)
downloadgnunet-73515c3ba4c4e34e5d86d8342c8763a7c2782d7e.tar.gz
gnunet-73515c3ba4c4e34e5d86d8342c8763a7c2782d7e.zip
gnunet-dev.nix
Diffstat (limited to 'gnunet-dev.nix')
-rw-r--r--gnunet-dev.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/gnunet-dev.nix b/gnunet-dev.nix
new file mode 100644
index 000000000..7ffc0d94c
--- /dev/null
+++ b/gnunet-dev.nix
@@ -0,0 +1,78 @@
1{ stdenv, makeWrapper, pkgconfig, autoconf, automake, ccache, ccache_dir ? ""
2, adns, curl, gettext, gmp, gnutls, gss, ncurses, openldap, zlib, sqlite, mariadb, postgresql
3, libextractor, libgcrypt, libgnurl, libidn, libmicrohttpd
4, libpsl, libtool, libunistring, libxml2
5}:
6
7stdenv.mkDerivation rec {
8 src = ./.;
9 name = "gnunet-dev";
10
11 buildInputs = [
12 makeWrapper pkgconfig autoconf automake ccache
13 adns curl gettext gmp gnutls gss ncurses openldap zlib sqlite mariadb postgresql
14 libextractor libgcrypt libgnurl libidn libmicrohttpd
15 libpsl libtool libunistring libxml2
16 ];
17
18 patchPhase = ''
19 test -e Makefile && make distclean
20 '';
21
22 NIX_CFLAGS_COMPILE = "-ggdb -O0";
23
24 configureFlags = [
25 "--enable-gcc-hardening"
26 "--enable-linker-hardening"
27
28 "--enable-experimental"
29 "--enable-logging=verbose"
30 "--enable-poisoning"
31 ];
32
33 preConfigure = ''
34 ./bootstrap
35 configureFlags="$configureFlags --with-nssdir=$out/lib"
36
37 if [ -n "${ccache_dir}" ]; then
38 export CC='ccache gcc'
39 export CCACHE_COMPRESS=1
40 export CCACHE_DIR="${ccache_dir}"
41 export CCACHE_UMASK=007
42 fi
43 '';
44
45 doCheck = false;
46
47 postInstall = ''
48 # Tests can be run this way
49 #export GNUNET_PREFIX="$out"
50 #export PATH="$out/bin:$PATH"
51 #make -k check
52 '';
53
54 meta = with stdenv.lib; {
55 description = "GNU's decentralized anonymous and censorship-resistant P2P framework";
56
57 longDescription = ''
58 GNUnet is a framework for secure peer-to-peer networking that
59 does not use any centralized or otherwise trusted services. A
60 first service implemented on top of the networking layer
61 allows anonymous censorship-resistant file-sharing. Anonymity
62 is provided by making messages originating from a peer
63 indistinguishable from messages that the peer is routing. All
64 peers act as routers and use link-encrypted connections with
65 stable bandwidth utilization to communicate with each other.
66 GNUnet uses a simple, excess-based economic model to allocate
67 resources. Peers in GNUnet monitor each others behavior with
68 respect to resource usage; peers that contribute to the
69 network are rewarded with better service.
70 '';
71
72 homepage = https://gnunet.org/;
73
74 license = licenses.gpl3Plus;
75 platforms = platforms.gnu;
76 maintainers = with maintainers; [ ];
77 };
78}