gnu: r-opencyto: Update to 2.8.4.
[jackhill/guix/guix.git] / gnu / packages / magic-wormhole.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
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.
10 ;;;
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.
15 ;;;
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/>.
18
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))
29
30 (define-public magic-wormhole-mailbox-server
31 (package
32 (name "magic-wormhole-mailbox-server")
33 (version "0.4.1")
34 (source
35 (origin
36 (method url-fetch)
37 (uri (pypi-uri "magic-wormhole-mailbox-server" version))
38 (sha256
39 (base32
40 "1yw8i8jv5iv1kkz1aqimskw7fpichjn6ww0fq0czbalwj290bw8s"))))
41 (build-system python-build-system)
42 (arguments
43 '(#:phases
44 (modify-phases %standard-phases
45 (add-after 'unpack 'patch-tests
46 (lambda _
47 ;; This test requires network access.
48 (substitute* "src/wormhole_mailbox_server/test/test_web.py"
49 (("test_log_http") "disabled_test_log_http"))
50 #t)))))
51 (native-inputs
52 (list python-mock))
53 (propagated-inputs
54 (list python-attrs
55 python-autobahn
56 python-idna
57 python-service-identity
58 python-six
59 python-treq
60 python-twisted))
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.")
67 (license expat)))
68
69 (define-public magic-wormhole-transit-relay
70 (package
71 (name "magic-wormhole-transit-relay")
72 (version "0.2.1")
73 (source
74 (origin
75 (method url-fetch)
76 (uri (pypi-uri "magic-wormhole-transit-relay" version))
77 (sha256
78 (base32
79 "0ppsx2s1ysikns1h053x67z2zmficbn3y3kf52bzzslhd2s02j6b"))))
80 (build-system python-build-system)
81 (arguments
82 `(#:phases
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))
90 (find-files "docs/"))
91 #t))))))
92 (native-inputs
93 (list python-mock python-pyflakes python-tox))
94 (propagated-inputs
95 (list python-twisted))
96 (home-page
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.")
104 (license expat)))
105
106 (define-public magic-wormhole
107 (package
108 (name "magic-wormhole")
109 (version "0.12.0")
110 (source
111 (origin
112 (method url-fetch)
113 (uri (pypi-uri "magic-wormhole" version))
114 (sha256
115 (base32
116 "0q41j99718y7m95zg1vaybnsp31lp6lhyqkbv4yqz5ys6jixh3qv"))))
117 (build-system python-build-system)
118 (arguments
119 '(#:phases
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))
128 #t)))))
129 (native-inputs
130 (list python-mock
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))
136 (propagated-inputs
137 (list python-autobahn
138 python-click
139 python-hkdf
140 python-humanize
141 python-pynacl
142 python-spake2
143 python-tqdm
144 python-twisted
145 python-txtorcon))
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.
154
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.")
159 (license expat)))