From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 9wpsMfwBB2HEmAAAgWs5BA (envelope-from ) for ; Sun, 01 Aug 2021 22:20:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uD6lLPwBB2FQAwAA1q6Kng (envelope-from ) for ; Sun, 01 Aug 2021 20:20:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 43D2D1838A for ; Sun, 1 Aug 2021 22:20:12 +0200 (CEST) Received: from localhost ([::1]:38708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAHwQ-00080o-UF for larch@yhetil.org; Sun, 01 Aug 2021 16:20:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAHwI-0007yS-39 for guix-patches@gnu.org; Sun, 01 Aug 2021 16:20:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mAHwH-0000ba-Qd for guix-patches@gnu.org; Sun, 01 Aug 2021 16:20:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mAHwH-0004SL-NT for guix-patches@gnu.org; Sun, 01 Aug 2021 16:20:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49494] [PATCH v2] gnu: Add nncp. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 01 Aug 2021 20:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49494 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sarah Morgensen Cc: Arun Isaac , 49494@debbugs.gnu.org Received: via spool by 49494-submit@debbugs.gnu.org id=B49494.162784919717114 (code B ref 49494); Sun, 01 Aug 2021 20:20:01 +0000 Received: (at 49494) by debbugs.gnu.org; 1 Aug 2021 20:19:57 +0000 Received: from localhost ([127.0.0.1]:36990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAHw5-0004Rp-Lp for submit@debbugs.gnu.org; Sun, 01 Aug 2021 16:19:57 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:46266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAHw3-0004Re-Ay for 49494@debbugs.gnu.org; Sun, 01 Aug 2021 16:19:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SnZlX6YPO/SgOAa0gKELme/baXou0c6V7X+19PjCpio=; b=PNwRfvvNFbnJgtwYFmc//jd0Or oe9dSm5TR3dqQcVhPXJ9bMbxLcSIN+BnPTgxd07YsMCeeJOBBBlW6GE513XKUyYQQQHs4Fm0weJzC mGtJsFo2B2Sb8MY0VWhc5bKYMX7R8X3kAAU1QePwd8lkoNod7gtYzvSmSIKPFofhv3PEEUf67zBbm Jzjxzkwyq9Fe2+1xhI8U/zqj+xoCHRf/9P6D0F4Eym/kO6HxBHShr9QQEk7/UB+67yYjDbrKp2UmR mqMYXb4+LW4N/2DixsmWZoeo+zam10Jqjm0+3aDU1cI77P7KeZaquy8AcKlgvRVf/MfLwNTy7qJd3 Z2JW39pA==; Received: from [192.168.2.1] (helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mAHw0-0003CW-Qg; Mon, 02 Aug 2021 01:49:44 +0530 From: Arun Isaac Date: Mon, 2 Aug 2021 01:49:42 +0530 Message-Id: <20210801201942.27295-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <87o8agapkl.fsf@systemreboot.net> References: <87o8agapkl.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627849212; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=SnZlX6YPO/SgOAa0gKELme/baXou0c6V7X+19PjCpio=; b=R1nHmi2vamm0jxWC77w9HKtPmCCT8kcezHlIMnU0deVqAceNCBiUlKznI6Z2LsbbfzN5R0 jw4Ooq6sMQg4Pae2FxbBeLOtrgaXnxLu7h97/49MqjnlGAwhp82o8Vu0UxXpKKBU/EjbDf GrvaSu1FayFwbLDJ6LrdFxzVp933MHezjqDADTYzFJxBqcYJC0wwX57kJrv1BVC2xr3fiC qNYBYLOyq/yGfhD8Q4ukpCiGYDylB2/jXamnSZEITa7nR9bIbAfcFMnGw5uidGNrc/pjC4 WyiO2oBvp2bgy3EBtHqqtzGfaxnzDxXdRGVDWZqrxG/tW2cGhF4uNP5QIYJdmA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627849212; a=rsa-sha256; cv=none; b=t5e+DOOApPQhsP+3OQV+XSsftLFBbtnr1hZLu6XICvTq5wUlA6MiIASSqqwTt+6OZAmqxW wigc5pnsDWD5I0ql1INNAOqOcPNDD1fJHPQQyG7Sy2OCK+Zj+iM46ri1cOnnMcl1820BvQ V+X9cCCDe5zkQ/X1606cv0DhQh3MBMheRw5wKE1d7q5IcPAJS1xwsgVndiHZd0NAhZ5hFC uXbY+QwB+yHTiDiGowF8lWg1s09eslSR3WzcHxzP3bMPER5upNq5Gf2pU653JWgQ6ozhb6 CxcC69Kmq3Y0ORScsVmv0BRcEBYvFZyhoQD+YSxz5Tp6i3CajMvcwmXJ29Sr/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=PNwRfvvN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=PNwRfvvN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 43D2D1838A X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: BtfO9tVHfhPT * gnu/packages/uucp.scm (nncp): New variable. --- gnu/packages/uucp.scm | 110 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a/gnu/packages/uucp.scm b/gnu/packages/uucp.scm index 1bb4fdb975..efc6665111 100644 --- a/gnu/packages/uucp.scm +++ b/gnu/packages/uucp.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Ludovic Courtès +;;; Copyright © 2021 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,10 +18,13 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages uucp) + #:use-module (gnu packages golang) + #:use-module (gnu packages texinfo) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix build-system go)) (define-public uucp (package @@ -54,3 +58,107 @@ set of utilities for remotely transferring files, email and net news between computers.") (license gpl2+))) + +(define-public nncp + (package + (name "nncp") + (version "7.5.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.nncpgo.org/download/nncp-" + version ".tar.xz")) + (sha256 + (base32 + "1r1zgj7gpkdmdm3wf31m0xi8y313kzd4dbyp4r4y8khnp32jvn8l")) + (modules '((ice-9 ftw) + (guix build utils))) + (snippet + '(begin + ;; Unbundle dependencies. + ;; TODO: go.cypherpunks.ru was down at the time of + ;; packaging. Unbundle go.cypherpunks dependencies as well once it + ;; comes back online. + (for-each (lambda (file) + (unless (member file (list "." ".." "go.cypherpunks.ru")) + (delete-file-recursively (string-append "src/vendor/" file)))) + (scandir "src/vendor")) + ;; Delete built documentation. + (delete-file "doc/nncp.info") + #t)))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + ((guix build go-build-system) #:prefix go:) + (guix build utils)) + #:imported-modules ,%go-build-system-modules + #:phases + (modify-phases %standard-phases + (add-before 'unpack 'setup-go-environment + (assoc-ref go:%standard-phases 'setup-go-environment)) + (add-after 'unpack 'go-unpack + (lambda* (#:key source #:allow-other-keys) + ;; Copy source to GOPATH. + (copy-recursively "src" "../src/go.cypherpunks.ru/nncp/v7") + ;; Move bundled dependencies to GOPATH. + (for-each (lambda (dependency) + (rename-file (string-append "src/vendor/go.cypherpunks.ru/" + dependency) + (string-append "../src/go.cypherpunks.ru/" + dependency))) + (list "balloon" "recfile")) + ;; Delete empty bundled dependencies directory. + (delete-file-recursively "src/vendor"))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Set configuration path. + (setenv "CFGPATH" "/etc/nncp.hjson") + ;; Set output directories. + (setenv "BINDIR" (string-append out "/bin")) + (setenv "INFODIR" (string-append out "/share/info")) + (setenv "DOCDIR" (string-append out "/share/doc/nncp"))) + ;; Set absolute store paths to sh and cat. + (substitute* (list "src/pipe.go" "src/toss_test.go") + (("/bin/sh") (which "sh"))) + (substitute* "src/toss_test.go" + (("; cat") (string-append "; " (which "cat")))) + ;; Remove module flags. + (substitute* (list "bin/default.do" "bin/hjson-cli.do" "test.do") + ((" -mod=vendor") "") + ((" -m") "")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "contrib/do" "-c" "test")))) + (add-after 'install 'remove-go-references + (assoc-ref go:%standard-phases 'remove-go-references))))) + (inputs + `(("go-github-com-davecgh-go-xdr" ,go-github-com-davecgh-go-xdr) + ("go-github-com-dustin-go-humanize" ,go-github-com-dustin-go-humanize) + ("go-github-com-flynn-noise" ,go-github-com-flynn-noise) + ("go-github-com-gorhill-cronexpr" ,go-github-com-gorhill-cronexpr) + ("go-github-com-hjson-hjson-go" ,go-github-com-hjson-hjson-go) + ("go-github-com-klauspost-compress" ,go-github-com-klauspost-compress) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) + ("go-golang-org-x-net" ,go-golang-org-x-net) + ("go-golang-org-x-term" ,go-golang-org-x-term) + ("go-lukechampine-com-blake3" ,go-lukechampine-com-blake3))) + (native-inputs + `(("go" ,go) + ("texinfo" ,texinfo))) + (home-page "http://www.nncpgo.org/") + (synopsis "Store and forward utilities") + (description "NNCP (Node to Node copy) is a collection of utilities +simplifying secure store-and-forward files, mail and command exchanging. +These 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. Multicasting areas, offline +sneakernet/floppynet, dead drops, sequential and append-only CD-ROM/tape +storages, air-gapped computers and online TCP daemon with full-duplex +resumable data transmission exists are all supported.") + (license gpl3))) -- 2.32.0