2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-12-16 17:19:28 +00:00
|
|
|
, go
|
|
|
|
, fetchurl
|
2020-09-27 20:52:41 +01:00
|
|
|
, redo-apenwarr
|
2019-12-16 17:19:28 +00:00
|
|
|
, curl
|
|
|
|
, perl
|
|
|
|
, genericUpdater
|
|
|
|
, writeShellScript
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nncp";
|
2021-04-14 19:47:09 +01:00
|
|
|
version = "6.3.0";
|
2019-12-16 17:19:28 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz";
|
2021-04-14 19:47:09 +01:00
|
|
|
sha256 = "0ss6p91r9sr3q8p8f6mjjc2cspx3fq0q4w44gfxl0da2wc8nmhkn";
|
2019-12-16 17:19:28 +00:00
|
|
|
};
|
|
|
|
|
2020-09-27 20:52:41 +01:00
|
|
|
nativeBuildInputs = [ go redo-apenwarr ];
|
2019-12-16 17:19:28 +00:00
|
|
|
|
2020-09-27 20:52:41 +01:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
2019-12-16 17:19:28 +00:00
|
|
|
export GOCACHE=$PWD/.cache
|
2020-09-27 20:52:41 +01:00
|
|
|
export CFGPATH=/etc/nncp.hjson
|
|
|
|
export SENDMAIL=sendmail # default value for generated config file
|
|
|
|
redo ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES}}
|
|
|
|
runHook postBuild
|
2019-12-16 17:19:28 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-27 20:52:41 +01:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
export PREFIX=$out
|
|
|
|
rm -f INSTALL # work around case insensitivity
|
|
|
|
redo install
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2019-12-16 17:19:28 +00:00
|
|
|
|
|
|
|
passthru.updateScript = genericUpdater {
|
|
|
|
inherit pname version;
|
|
|
|
versionLister = writeShellScript "nncp-versionLister" ''
|
|
|
|
echo "# Versions for $1:" >> "$2"
|
|
|
|
${curl}/bin/curl -s http://www.nncpgo.org/Tarballs.html | ${perl}/bin/perl -lne 'print $1 if /Release.*>([0-9.]+)</'
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-12-16 17:19:28 +00:00
|
|
|
description = "Secure UUCP-like store-and-forward exchanging";
|
|
|
|
longDescription = ''
|
|
|
|
This utilities are intended to help build up small size (dozens of
|
|
|
|
nodes) ad-hoc friend-to-friend (F2F) statically routed darknet
|
|
|
|
delay-tolerant networks for fire-and-forget secure reliable files,
|
|
|
|
file requests, Internet mail and commands transmission. All
|
|
|
|
packets are integrity checked, end-to-end encrypted, explicitly
|
|
|
|
authenticated by known participants public keys. Onion encryption
|
|
|
|
is applied to relayed packets. Each node acts both as a client and
|
|
|
|
server, can use push and poll behaviour model.
|
|
|
|
|
|
|
|
Out-of-box offline sneakernet/floppynet, dead drops, sequential
|
|
|
|
and append-only CD-ROM/tape storages, air-gapped computers
|
|
|
|
support. But online TCP daemon with full-duplex resumable data
|
|
|
|
transmission exists.
|
|
|
|
'';
|
|
|
|
homepage = "http://www.nncpgo.org/";
|
2020-09-27 20:52:41 +01:00
|
|
|
license = licenses.gpl3Only;
|
2019-12-16 17:19:28 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.woffs ];
|
|
|
|
};
|
|
|
|
}
|