98 lines
3.1 KiB
Nix
98 lines
3.1 KiB
Nix
{ stdenv, fetchgit, libtool, pkgconfig, autoconf, automake, gettext, libgcrypt
|
|
, libidn2, zlib, libunistring, glpk, miniupnpc, libextractor, jansson, libgnurl
|
|
, sqlite, postgresql, mariadb, libmicrohttpd, iptables, nettools, gnutls
|
|
, unbound, coreutils, file, python3, texinfo
|
|
, makeWrapper
|
|
, withVerbose ? true
|
|
, withDocumentation ? false
|
|
, withSqlite ? true
|
|
, withPostgres ? false
|
|
, withMariadb ? false}:
|
|
|
|
with stdenv.lib;
|
|
|
|
let
|
|
rev = "e1cd257e18129025283f152e2b32aa9d5bcc1686";
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
name = "gnunet-${rev}";
|
|
|
|
src = fetchgit {
|
|
#url = https://gnunet.org/git/gnunet.git;
|
|
url = https://ulrich.earth/code/gnunet;
|
|
inherit rev;
|
|
sha256 = "0794pqpm651hdzc1qv482a8hfnrb9hgrw1ndxaan65fg0f545jxg";
|
|
};
|
|
|
|
phases = [
|
|
"unpackPhase" "preConfigure" "configurePhase" "buildPhase" "installPhase"
|
|
"checkPhase"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
#doCheck = true;
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper libtool pkgconfig autoconf automake gettext coreutils file
|
|
python3
|
|
]
|
|
++ optional withDocumentation texinfo;
|
|
|
|
buildInputs = [
|
|
libgcrypt libidn2 zlib libunistring glpk miniupnpc libextractor jansson
|
|
libgnurl libmicrohttpd iptables nettools gnutls unbound
|
|
]
|
|
++ optional withSqlite sqlite
|
|
++ optional withPostgres postgresql
|
|
++ optional withMariadb mariadb;
|
|
|
|
configureFlags =
|
|
optional withVerbose "--enable-logging=verbose"
|
|
++ optional (!withDocumentation) "--disable-documentation";
|
|
|
|
preConfigure = ''
|
|
substituteInPlace configure.ac --replace "/usr/sbin/iptables" "iptables"
|
|
substituteInPlace configure.ac --replace "/sbin/ifconfig" "ifconfig"
|
|
sh bootstrap
|
|
substituteInPlace configure --replace "/usr/bin/file" "file"
|
|
substituteInPlace configure --replace "/usr/bin/objformat" "objformat"
|
|
'';
|
|
|
|
/* FIXME: Tests must be run this way, but there are still a couple of
|
|
failures. */
|
|
|
|
checkPhase =
|
|
'' export GNUNET_PREFIX="$out"
|
|
export GNUNET_TMP="$TMPDIR"
|
|
export PATH="$out/bin:$PATH"
|
|
make -k check
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "GNUnet, GNU's decentralized anonymous and censorship-resistant P2P framework";
|
|
|
|
longDescription = ''
|
|
GNUnet is a framework for secure peer-to-peer networking that
|
|
does not use any centralized or otherwise trusted services. A
|
|
first service implemented on top of the networking layer
|
|
allows anonymous censorship-resistant file-sharing. Anonymity
|
|
is provided by making messages originating from a peer
|
|
indistinguishable from messages that the peer is routing. All
|
|
peers act as routers and use link-encrypted connections with
|
|
stable bandwidth utilization to communicate with each other.
|
|
GNUnet uses a simple, excess-based economic model to allocate
|
|
resources. Peers in GNUnet monitor each others behavior with
|
|
respect to resource usage; peers that contribute to the
|
|
network are rewarded with better service.
|
|
'';
|
|
|
|
homepage = https://gnunet.org/;
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
platforms = platforms.gnu ++ platforms.linux;
|
|
};
|
|
}
|