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