2021-12-21 02:18:32 +00:00
|
|
|
{ lib, stdenv, go, fetchurl, redo-apenwarr, curl, perl, genericUpdater
|
2023-07-15 17:15:38 +00:00
|
|
|
, writeShellScript, cfgPath ? "/etc/nncp.hjson" }:
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nncp";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "8.8.3";
|
2021-12-21 02:18:32 +00:00
|
|
|
outputs = [ "out" "doc" "info" ];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-IldQCEdH6XDYK+DW5lB/5HFFFGuq1nDkCwEaVo7vIvE=";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ go redo-apenwarr ];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2021-12-21 02:18:32 +00:00
|
|
|
# Build parameters
|
|
|
|
CFGPATH = cfgPath;
|
|
|
|
SENDMAIL = "sendmail";
|
|
|
|
|
|
|
|
preConfigure = "export GOCACHE=$NIX_BUILD_TOP/gocache";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
export PREFIX=$out
|
|
|
|
rm -f INSTALL # work around case insensitivity
|
|
|
|
redo install
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
passthru.updateScript = genericUpdater {
|
|
|
|
versionLister = writeShellScript "nncp-versionLister" ''
|
2021-12-21 02:18:32 +00:00
|
|
|
${curl}/bin/curl -s ${meta.downloadPage} | ${perl}/bin/perl -lne 'print $1 if /Release.*>([0-9.]+)</'
|
2020-10-07 09:15:18 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-07 09:15:18 +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/";
|
2021-12-21 02:18:32 +00:00
|
|
|
downloadPage = "http://www.nncpgo.org/Tarballs.html";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "http://www.nncpgo.org/News.html";
|
2021-03-19 17:17:44 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-10-07 09:15:18 +00:00
|
|
|
platforms = platforms.all;
|
2021-12-21 02:18:32 +00:00
|
|
|
maintainers = with maintainers; [ ehmry woffs ];
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
}
|