nixpkgs-suyu/pkgs/by-name/nn/nncp/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
2.2 KiB
Nix
Raw Normal View History

{ cfgPath ? "/etc/nncp.hjson"
, curl
, fetchurl
, lib
, genericUpdater
, go
, perl
, stdenv
, writeShellScript
}:
2019-12-16 18:19:28 +01:00
2023-08-15 19:27:14 +02:00
stdenv.mkDerivation (finalAttrs: {
2019-12-16 18:19:28 +01:00
pname = "nncp";
2023-11-01 10:45:42 +01:00
version = "8.10.0";
outputs = [ "out" "doc" "info" ];
2019-12-16 18:19:28 +01:00
src = fetchurl {
2023-08-15 19:27:14 +02:00
url = "http://www.nncpgo.org/download/nncp-${finalAttrs.version}.tar.xz";
2023-11-01 10:45:42 +01:00
sha256 = "154e13ba15c0ea93f54525793b0699e496b2db7281e1555f08d785a528f3f7fc";
2019-12-16 18:19:28 +01:00
};
nativeBuildInputs = [
go
];
2019-12-16 18:19:28 +01:00
# Build parameters
CFGPATH = cfgPath;
SENDMAIL = "sendmail";
preConfigure = "export GOCACHE=$NIX_BUILD_TOP/gocache";
2019-12-16 18:19:28 +01:00
2023-08-14 09:51:28 +02:00
buildPhase = ''
runHook preBuild
./bin/build
runHook postBuild
'';
installPhase = ''
runHook preInstall
2023-08-14 09:51:28 +02:00
PREFIX=$out ./install
runHook postInstall
'';
enableParallelBuilding = true;
2019-12-16 18:19:28 +01:00
passthru.updateScript = genericUpdater {
versionLister = writeShellScript "nncp-versionLister" ''
2023-08-15 19:27:14 +02:00
${curl}/bin/curl -s ${finalAttrs.meta.downloadPage} | ${perl}/bin/perl -lne 'print $1 if /Release.*>([0-9.]+)</'
2019-12-16 18:19:28 +01:00
'';
};
meta = {
broken = stdenv.isDarwin;
changelog = "http://www.nncpgo.org/News.html";
2019-12-16 18:19:28 +01:00
description = "Secure UUCP-like store-and-forward exchanging";
downloadPage = "http://www.nncpgo.org/Tarballs.html";
homepage = "http://www.nncpgo.org/";
license = lib.licenses.gpl3Only;
2019-12-16 18:19:28 +01:00
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.
'';
maintainers = with lib.maintainers; [ ehmry woffs ];
platforms = lib.platforms.all;
2019-12-16 18:19:28 +01:00
};
2023-08-15 19:27:14 +02:00
})