From c9b36f450b1c598174b03af19c35efc4bf1ee9e5 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 17 Feb 2019 15:44:56 -0500 Subject: gnu: Add magic-wormhole-mailbox-server. * gnu/packages/magic-wormhole.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/packages/magic-wormhole.scm | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 gnu/packages/magic-wormhole.scm (limited to 'gnu/packages/magic-wormhole.scm') diff --git a/gnu/packages/magic-wormhole.scm b/gnu/packages/magic-wormhole.scm new file mode 100644 index 0000000000..b99ee7b113 --- /dev/null +++ b/gnu/packages/magic-wormhole.scm @@ -0,0 +1,65 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Leo Famulari +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages magic-wormhole) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix licenses) + #:use-module (guix build-system python) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-web) + #:use-module (gnu packages python-xyz)) + +(define-public magic-wormhole-mailbox-server + (package + (name "magic-wormhole-mailbox-server") + (version "0.3.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "magic-wormhole-mailbox-server" version)) + (sha256 + (base32 + "1q6zhbx8fcpk7rchclm7yqcxdsc1x97hki2ji61sa544r5xvxv55")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-tests + (lambda _ + ;; This test requires network access. + (substitute* "src/wormhole_mailbox_server/test/test_web.py" + (("test_log_http") "disabled_test_log_http")) + #t))))) + (native-inputs + `(("python-mock" ,python-mock))) + (propagated-inputs + `(("python-attrs" ,python-attrs) + ("python-autobahn" ,python-autobahn) + ("python-idna" ,python-idna) + ("python-service-identity" ,python-service-identity) + ("python-six" ,python-six) + ("python-treq" ,python-treq) + ("python-twisted" ,python-twisted))) + (home-page "https://github.com/warner/magic-wormhole-mailbox-server") + (synopsis "Magic-Wormhole central mailbox server") + (description "This package provides the main server that Magic-Wormhole +clients connect to. The server performs store-and-forward delivery for small +key-exchange and control messages. Bulk data is sent over a direct TCP +connection, or through a transit-relay.") + (license expat))) -- cgit v1.2.3 From 6924a2bdc59648b672944992bef02f411803eeb8 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 18 Feb 2019 23:57:09 -0500 Subject: gnu: Add magic-wormhole-transit-relay. * gnu/packages/magic-wormhole.scm (magic-wormhole-transit-relay): New variable. --- gnu/packages/magic-wormhole.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'gnu/packages/magic-wormhole.scm') diff --git a/gnu/packages/magic-wormhole.scm b/gnu/packages/magic-wormhole.scm index b99ee7b113..0ff214a397 100644 --- a/gnu/packages/magic-wormhole.scm +++ b/gnu/packages/magic-wormhole.scm @@ -21,6 +21,7 @@ #:use-module (guix download) #:use-module (guix licenses) #:use-module (guix build-system python) + #:use-module (gnu packages check) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz)) @@ -63,3 +64,42 @@ clients connect to. The server performs store-and-forward delivery for small key-exchange and control messages. Bulk data is sent over a direct TCP connection, or through a transit-relay.") (license expat))) + +(define-public magic-wormhole-transit-relay + (package + (name "magic-wormhole-transit-relay") + (version "0.1.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "magic-wormhole-transit-relay" version)) + (sha256 + (base32 + "11w5gdc6am2ph5rns60x0694sx4zrlzxj540jljhn5cmnbx1ngxi")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'install-docs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (docs (string-append out "/share/doc/magic-wormhole-transit-relay"))) + (for-each (lambda (file) + (install-file file docs)) + (find-files "docs/")) + #t)))))) + (native-inputs + `(("python-mock" ,python-mock) + ("python-pyflakes" ,python-pyflakes) + ("python-tox" ,python-tox))) + (propagated-inputs + `(("python-twisted" ,python-twisted))) + (home-page + "https://github.com/warner/magic-wormhole-transit-relay") + (synopsis "Magic-Wormhole relay server") + (description "This package provides the Magic-Wormhole Transit Relay +server, which helps clients establish bulk-data transit connections even when +both are behind NAT boxes. Each side makes a TCP connection to this server and +presents a handshake. Two connections with identical handshakes are glued +together, allowing them to pretend they have a direct connection.") + (license expat))) -- cgit v1.2.3 From a7db61a55dc4e369574e206a86f9e5721f4a890b Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 18 Feb 2019 23:58:21 -0500 Subject: gnu: Add Magic-Wormhole. * gnu/packages/magic-wormhole.scm (magic-wormhole): New variable. --- gnu/packages/magic-wormhole.scm | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'gnu/packages/magic-wormhole.scm') diff --git a/gnu/packages/magic-wormhole.scm b/gnu/packages/magic-wormhole.scm index 0ff214a397..bdfc1162b6 100644 --- a/gnu/packages/magic-wormhole.scm +++ b/gnu/packages/magic-wormhole.scm @@ -103,3 +103,58 @@ both are behind NAT boxes. Each side makes a TCP connection to this server and presents a handshake. Two connections with identical handshakes are glued together, allowing them to pretend they have a direct connection.") (license expat))) + +(define-public magic-wormhole + (package + (name "magic-wormhole") + (version "0.11.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "magic-wormhole" version)) + (sha256 + (base32 + "01fr4bi6kc6fz9n3c4qq892inrc3nf6p2djy65yvm7xkvdxncydf")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + ;; XXX I can't figure out how to build the docs properly. + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34515#101 + (add-after 'install 'install-docs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man (string-append out "/share/man/man1"))) + (install-file "docs/wormhole.1" man)) + #t))))) + (native-inputs + `(("python-mock" ,python-mock) + ;; XXX These are required for the test suite but end up being referenced + ;; by the built package. + ;; https://bugs.gnu.org/25235 + ("magic-wormhole-mailbox-server" ,magic-wormhole-mailbox-server) + ("magic-wormhole-transit-relay" ,magic-wormhole-transit-relay))) + (propagated-inputs + `(("python-autobahn" ,python-autobahn) + ("python-click" ,python-click) + ("python-hkdf" ,python-hkdf) + ("python-humanize" ,python-humanize) + ("python-pynacl" ,python-pynacl) + ("python-spake2" ,python-spake2) + ("python-tqdm" ,python-tqdm) + ("python-twisted" ,python-twisted) + ("python-txtorcon" ,python-txtorcon))) + (home-page "https://github.com/warner/magic-wormhole") + (synopsis "Securely transfer data between computers") + (description "Magic-Wormhole is a library and a command-line tool named +wormhole, which makes it possible to securely transfer arbitrary-sized files and +directories (or short pieces of text) from one computer to another. The two +endpoints are identified by using identical \"wormhole codes\": in general, the +sending machine generates and displays the code, which must then be typed into +the receiving machine. + +The codes are short and human-pronounceable, using a phonetically-distinct +wordlist. The receiving side offers tab-completion on the codewords, so usually +only a few characters must be typed. Wormhole codes are single-use and do not +need to be memorized.") + (license expat))) -- cgit v1.2.3