1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages magic-wormhole)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix licenses)
23 #:use-module (guix build-system python)
24 #:use-module (gnu packages check)
25 #:use-module (gnu packages python-check)
26 #:use-module (gnu packages python-crypto)
27 #:use-module (gnu packages python-web)
28 #:use-module (gnu packages python-xyz))
30 (define-public magic-wormhole-mailbox-server
32 (name "magic-wormhole-mailbox-server")
37 (uri (pypi-uri "magic-wormhole-mailbox-server" version))
40 "1yw8i8jv5iv1kkz1aqimskw7fpichjn6ww0fq0czbalwj290bw8s"))))
41 (build-system python-build-system)
44 (modify-phases %standard-phases
45 (add-after 'unpack 'patch-tests
47 ;; This test requires network access.
48 (substitute* "src/wormhole_mailbox_server/test/test_web.py"
49 (("test_log_http") "disabled_test_log_http"))
57 python-service-identity
61 (home-page "https://github.com/warner/magic-wormhole-mailbox-server")
62 (synopsis "Magic-Wormhole central mailbox server")
63 (description "This package provides the main server that Magic-Wormhole
64 clients connect to. The server performs store-and-forward delivery for small
65 key-exchange and control messages. Bulk data is sent over a direct TCP
66 connection, or through a transit-relay.")
69 (define-public magic-wormhole-transit-relay
71 (name "magic-wormhole-transit-relay")
76 (uri (pypi-uri "magic-wormhole-transit-relay" version))
79 "0ppsx2s1ysikns1h053x67z2zmficbn3y3kf52bzzslhd2s02j6b"))))
80 (build-system python-build-system)
83 (modify-phases %standard-phases
84 (add-after 'install 'install-docs
85 (lambda* (#:key outputs #:allow-other-keys)
86 (let* ((out (assoc-ref outputs "out"))
87 (docs (string-append out "/share/doc/magic-wormhole-transit-relay")))
88 (for-each (lambda (file)
89 (install-file file docs))
93 (list python-mock python-pyflakes python-tox))
95 (list python-twisted))
97 "https://github.com/warner/magic-wormhole-transit-relay")
98 (synopsis "Magic-Wormhole relay server")
99 (description "This package provides the Magic-Wormhole Transit Relay
100 server, which helps clients establish bulk-data transit connections even when
101 both are behind NAT boxes. Each side makes a TCP connection to this server and
102 presents a handshake. Two connections with identical handshakes are glued
103 together, allowing them to pretend they have a direct connection.")
106 (define-public magic-wormhole
108 (name "magic-wormhole")
113 (uri (pypi-uri "magic-wormhole" version))
116 "0q41j99718y7m95zg1vaybnsp31lp6lhyqkbv4yqz5ys6jixh3qv"))))
117 (build-system python-build-system)
120 (modify-phases %standard-phases
121 ;; XXX I can't figure out how to build the docs properly.
122 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34515#101
123 (add-after 'install 'install-docs
124 (lambda* (#:key outputs #:allow-other-keys)
125 (let* ((out (assoc-ref outputs "out"))
126 (man (string-append out "/share/man/man1")))
127 (install-file "docs/wormhole.1" man))
131 ;; XXX These are required for the test suite but end up being referenced
132 ;; by the built package.
133 ;; https://bugs.gnu.org/25235
134 magic-wormhole-mailbox-server
135 magic-wormhole-transit-relay))
137 (list python-autobahn
146 (home-page "https://github.com/warner/magic-wormhole")
147 (synopsis "Securely transfer data between computers")
148 (description "Magic-Wormhole is a library and a command-line tool named
149 wormhole, which makes it possible to securely transfer arbitrary-sized files and
150 directories (or short pieces of text) from one computer to another. The two
151 endpoints are identified by using identical \"wormhole codes\": in general, the
152 sending machine generates and displays the code, which must then be typed into
153 the receiving machine.
155 The codes are short and human-pronounceable, using a phonetically-distinct
156 wordlist. The receiving side offers tab-completion on the codewords, so usually
157 only a few characters must be typed. Wormhole codes are single-use and do not
158 need to be memorized.")