git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #39672 from pstn/gnunet-git

gnunet: Add gnunet_git.

commit613e1485adaf87119c52cf4ed4bd09a6c00c5960 authorviric <viric@viric.name> dateSun 29 Apr 2018, 16:41 (9 years ago) parent97adb0349003e8
2 files changed+94
pkgs/applications/networking/p2p/gnunet/git.nix+92 pkgs/top-level/all-packages.nix+2
pkgs/applications/networking/p2p/gnunet/git.nixnew file+92
@@ -0,0 +1,92 @@
1+{ stdenv, fetchgit, libextractor, libmicrohttpd, libgcrypt
2+, zlib, gmp, curl, libtool, adns, sqlite, pkgconfig
3+, libxml2, ncurses, gettext, libunistring, libidn
4+, makeWrapper, autoconf, automake, texinfo, which
5+, withVerbose ? false }:
6+
7+let
8+ rev = "ce2864cfaa27e55096b480bf35db5f8cee2a5e7e";
9+in
10+stdenv.mkDerivation rec {
11+ name = "gnunet-git-${rev}";
12+
13+ src = fetchgit {
14+ url = https://gnunet.org/git/gnunet.git;
15+ inherit rev;
16+ sha256 = "0gbw920m9v4b3425c0d1h7drgl2m1fni1bwjn4fwqnyz7kdqzsgl";
17+ };
18+
19+ buildInputs = [
20+ libextractor libmicrohttpd libgcrypt gmp curl libtool
21+ zlib adns sqlite libxml2 ncurses libidn
22+ pkgconfig gettext libunistring makeWrapper
23+ autoconf automake texinfo which
24+ ];
25+
26+ configureFlags = stdenv.lib.optional withVerbose "--enable-logging=verbose ";
27+
28+ preConfigure = ''
29+ # Brute force: since nix-worker chroots don't provide
30+ # /etc/{resolv.conf,hosts}, replace all references to `localhost'
31+ # by their IPv4 equivalent.
32+ for i in $(find . \( -name \*.c -or -name \*.conf \) \
33+ -exec grep -l '\<localhost\>' {} \;)
34+ do
35+ echo "$i: substituting \`127.0.0.1' to \`localhost'..."
36+ sed -i "$i" -e's/\<localhost\>/127.0.0.1/g'
37+ done
38+
39+ # Make sure the tests don't rely on `/tmp', for the sake of chroot
40+ # builds.
41+ for i in $(find . \( -iname \*test\*.c -or -name \*.conf \) \
42+ -exec grep -l /tmp {} \;)
43+ do
44+ echo "$i: replacing references to \`/tmp' by \`$TMPDIR'..."
45+ substituteInPlace "$i" --replace "/tmp" "$TMPDIR"
46+ done
47+
48+ # Ensure NSS installation works fine
49+ configureFlags="$configureFlags --with-nssdir=$out/lib"
50+
51+ sh contrib/pogen.sh
52+ sh bootstrap
53+ '';
54+
55+ doCheck = false;
56+
57+ /* FIXME: Tests must be run this way, but there are still a couple of
58+ failures.
59+
60+ postInstall =
61+ '' export GNUNET_PREFIX="$out"
62+ export PATH="$out/bin:$PATH"
63+ make -k check
64+ '';
65+ */
66+
67+ meta = {
68+ description = "GNUnet, GNU's decentralized anonymous and censorship-resistant P2P framework";
69+
70+ longDescription = ''
71+ GNUnet is a framework for secure peer-to-peer networking that
72+ does not use any centralized or otherwise trusted services. A
73+ first service implemented on top of the networking layer
74+ allows anonymous censorship-resistant file-sharing. Anonymity
75+ is provided by making messages originating from a peer
76+ indistinguishable from messages that the peer is routing. All
77+ peers act as routers and use link-encrypted connections with
78+ stable bandwidth utilization to communicate with each other.
79+ GNUnet uses a simple, excess-based economic model to allocate
80+ resources. Peers in GNUnet monitor each others behavior with
81+ respect to resource usage; peers that contribute to the
82+ network are rewarded with better service.
83+ '';
84+
85+ homepage = https://gnunet.org/;
86+
87+ license = stdenv.lib.licenses.gpl2Plus;
88+
89+ maintainers = with stdenv.lib.maintainers; [ viric ];
90+ platforms = stdenv.lib.platforms.gnu;
91+ };
92+}
pkgs/top-level/all-packages.nix+2
@@ -16028,6 +16028,8 @@ with pkgs;
1602816028
1602916029 gnunet = callPackage ../applications/networking/p2p/gnunet { };
1603016030
16031+ gnunet_git = lowPrio (callPackage ../applications/networking/p2p/gnunet/git.nix { });
16032+
1603116033 gnunet_svn = lowPrio (callPackage ../applications/networking/p2p/gnunet/svn.nix { });
1603216034
1603316035 gocr = callPackage ../applications/graphics/gocr { };