From patchwork Fri Jul 9 16:19:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 31263 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0B23527BC81; Fri, 9 Jul 2021 17:23:56 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7C9EB27BC78 for ; Fri, 9 Jul 2021 17:23:55 +0100 (BST) Received: from localhost ([::1]:38274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1tIA-0005pM-Hb for patchwork@mira.cbaines.net; Fri, 09 Jul 2021 12:23:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1tES-00063q-U6 for guix-patches@gnu.org; Fri, 09 Jul 2021 12:20:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1tES-0005YQ-NC for guix-patches@gnu.org; Fri, 09 Jul 2021 12:20:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1tES-0004KQ-Ju for guix-patches@gnu.org; Fri, 09 Jul 2021 12:20:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49494] [PATCH 7/7] gnu: Add nncp. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jul 2021 16:20:04 +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: 49494@debbugs.gnu.org Cc: Arun Isaac Received: via spool by 49494-submit@debbugs.gnu.org id=B49494.162584760116583 (code B ref 49494); Fri, 09 Jul 2021 16:20:04 +0000 Received: (at 49494) by debbugs.gnu.org; 9 Jul 2021 16:20:01 +0000 Received: from localhost ([127.0.0.1]:59588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1tEJ-0004JG-W7 for submit@debbugs.gnu.org; Fri, 09 Jul 2021 12:20:00 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:42064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1tEA-0004Hq-DF for 49494@debbugs.gnu.org; Fri, 09 Jul 2021 12:19:49 -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=Zj79aa9DBQHMyi7JorHjwzLQmQT+i/viFvzmXy+bw3Y=; b=aOKKPQ6qPNpAWe7x2mO9txNQw+ TjBIjurO6wIIj+IKQgzIxniSiQ2IkKs8HCXf5qlaGxsmH9ODmS51hb810ybOB6juALKmAi74jstP2 k3QgK99Nj0cBvtmVJNCFygFsKgxkJWW63/6gLPuMyFSIj+5owVi0jzFdf/7LFIt30hMuZ5QEKytz8 y6Y0V/yRrIeJAPvbeLlBdaPLYTNfsIrD57b8qbQ3Ahg+mN/kFWyzvSX7mCg4nnAh3VKvv5RPjJNRU n7RhxXSKQMMCBhOErwRzbc6S4o20Q/i39Lt+QvIzXk4WgePMyZN96oTfL0x8M3CO8oR9KxTEMam/J M6rVE4dA==; 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 1m1tE7-000ASF-Gu; Fri, 09 Jul 2021 21:49:43 +0530 From: Arun Isaac Date: Fri, 9 Jul 2021 21:49:40 +0530 Message-Id: <20210709161940.12759-7-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210709161940.12759-1-arunisaac@systemreboot.net> References: <20210709161940.12759-1-arunisaac@systemreboot.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/uucp.scm (nncp): New variable. --- gnu/packages/uucp.scm | 99 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/gnu/packages/uucp.scm b/gnu/packages/uucp.scm index 1bb4fdb975..2d4d1ae8d0 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,6 +18,8 @@ ;;; 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) @@ -54,3 +57,99 @@ set of utilities for remotely transferring files, email and net news between computers.") (license gpl2+))) + +(define-public nncp + (package + (name "nncp") + (version "7.2.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.nncpgo.org/download/nncp-" + version ".tar.xz")) + (sha256 + (base32 + "0xsh5zc6i8nbcsi06r65lpp26hz2zb4vh0pzbkivdd69hrxvknvh")) + (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 + `(#:tests? #f ; tests fail + #:modules ((guix build gnu-build-system) + ((guix build go-build-system) #:prefix go:) + (guix build union) + (guix build utils)) + #:imported-modules (,@%gnu-build-system-modules + (guix build union) + (guix build go-build-system)) + #: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) + ;; Set output directories. + (let ((out (assoc-ref outputs "out"))) + (setenv "BINDIR" (string-append out "/bin")) + (setenv "INFODIR" (string-append out "/share/info")) + (setenv "DOCDIR" (string-append out "/share/doc/nncp"))) + ;; Remove module flags. + (substitute* (list "bin/default.do" "test.do") + ((" -mod=vendor") "") + ((" -m") ""))))))) + (inputs + `(("go" ,go))) + (native-inputs + `(("texinfo" ,texinfo))) + (propagated-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))) + (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)))