Commit | Line | Data |
---|---|---|
c9b36f45 LF |
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) | |
6924a2bd | 24 | #:use-module (gnu packages check) |
c9b36f45 LF |
25 | #:use-module (gnu packages python-crypto) |
26 | #:use-module (gnu packages python-web) | |
27 | #:use-module (gnu packages python-xyz)) | |
28 | ||
29 | (define-public magic-wormhole-mailbox-server | |
30 | (package | |
31 | (name "magic-wormhole-mailbox-server") | |
c5c25b39 | 32 | (version "0.4.1") |
c9b36f45 LF |
33 | (source |
34 | (origin | |
35 | (method url-fetch) | |
36 | (uri (pypi-uri "magic-wormhole-mailbox-server" version)) | |
37 | (sha256 | |
38 | (base32 | |
c5c25b39 | 39 | "1yw8i8jv5iv1kkz1aqimskw7fpichjn6ww0fq0czbalwj290bw8s")))) |
c9b36f45 LF |
40 | (build-system python-build-system) |
41 | (arguments | |
42 | '(#:phases | |
43 | (modify-phases %standard-phases | |
44 | (add-after 'unpack 'patch-tests | |
45 | (lambda _ | |
46 | ;; This test requires network access. | |
47 | (substitute* "src/wormhole_mailbox_server/test/test_web.py" | |
48 | (("test_log_http") "disabled_test_log_http")) | |
49 | #t))))) | |
50 | (native-inputs | |
51 | `(("python-mock" ,python-mock))) | |
52 | (propagated-inputs | |
53 | `(("python-attrs" ,python-attrs) | |
54 | ("python-autobahn" ,python-autobahn) | |
55 | ("python-idna" ,python-idna) | |
56 | ("python-service-identity" ,python-service-identity) | |
57 | ("python-six" ,python-six) | |
58 | ("python-treq" ,python-treq) | |
59 | ("python-twisted" ,python-twisted))) | |
60 | (home-page "https://github.com/warner/magic-wormhole-mailbox-server") | |
61 | (synopsis "Magic-Wormhole central mailbox server") | |
62 | (description "This package provides the main server that Magic-Wormhole | |
63 | clients connect to. The server performs store-and-forward delivery for small | |
64 | key-exchange and control messages. Bulk data is sent over a direct TCP | |
65 | connection, or through a transit-relay.") | |
66 | (license expat))) | |
6924a2bd LF |
67 | |
68 | (define-public magic-wormhole-transit-relay | |
69 | (package | |
70 | (name "magic-wormhole-transit-relay") | |
718c8837 | 71 | (version "0.2.1") |
6924a2bd LF |
72 | (source |
73 | (origin | |
74 | (method url-fetch) | |
75 | (uri (pypi-uri "magic-wormhole-transit-relay" version)) | |
76 | (sha256 | |
77 | (base32 | |
718c8837 | 78 | "0ppsx2s1ysikns1h053x67z2zmficbn3y3kf52bzzslhd2s02j6b")))) |
6924a2bd LF |
79 | (build-system python-build-system) |
80 | (arguments | |
81 | `(#:phases | |
82 | (modify-phases %standard-phases | |
83 | (add-after 'install 'install-docs | |
84 | (lambda* (#:key outputs #:allow-other-keys) | |
85 | (let* ((out (assoc-ref outputs "out")) | |
86 | (docs (string-append out "/share/doc/magic-wormhole-transit-relay"))) | |
87 | (for-each (lambda (file) | |
88 | (install-file file docs)) | |
89 | (find-files "docs/")) | |
90 | #t)))))) | |
91 | (native-inputs | |
92 | `(("python-mock" ,python-mock) | |
93 | ("python-pyflakes" ,python-pyflakes) | |
94 | ("python-tox" ,python-tox))) | |
95 | (propagated-inputs | |
96 | `(("python-twisted" ,python-twisted))) | |
97 | (home-page | |
98 | "https://github.com/warner/magic-wormhole-transit-relay") | |
99 | (synopsis "Magic-Wormhole relay server") | |
100 | (description "This package provides the Magic-Wormhole Transit Relay | |
101 | server, which helps clients establish bulk-data transit connections even when | |
102 | both are behind NAT boxes. Each side makes a TCP connection to this server and | |
103 | presents a handshake. Two connections with identical handshakes are glued | |
104 | together, allowing them to pretend they have a direct connection.") | |
105 | (license expat))) | |
a7db61a5 LF |
106 | |
107 | (define-public magic-wormhole | |
108 | (package | |
109 | (name "magic-wormhole") | |
fb5bb6bd | 110 | (version "0.12.0") |
a7db61a5 LF |
111 | (source |
112 | (origin | |
113 | (method url-fetch) | |
114 | (uri (pypi-uri "magic-wormhole" version)) | |
115 | (sha256 | |
116 | (base32 | |
fb5bb6bd | 117 | "0q41j99718y7m95zg1vaybnsp31lp6lhyqkbv4yqz5ys6jixh3qv")))) |
a7db61a5 LF |
118 | (build-system python-build-system) |
119 | (arguments | |
120 | '(#:phases | |
121 | (modify-phases %standard-phases | |
122 | ;; XXX I can't figure out how to build the docs properly. | |
123 | ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34515#101 | |
124 | (add-after 'install 'install-docs | |
125 | (lambda* (#:key outputs #:allow-other-keys) | |
126 | (let* ((out (assoc-ref outputs "out")) | |
127 | (man (string-append out "/share/man/man1"))) | |
128 | (install-file "docs/wormhole.1" man)) | |
129 | #t))))) | |
130 | (native-inputs | |
131 | `(("python-mock" ,python-mock) | |
132 | ;; XXX These are required for the test suite but end up being referenced | |
133 | ;; by the built package. | |
134 | ;; https://bugs.gnu.org/25235 | |
135 | ("magic-wormhole-mailbox-server" ,magic-wormhole-mailbox-server) | |
136 | ("magic-wormhole-transit-relay" ,magic-wormhole-transit-relay))) | |
137 | (propagated-inputs | |
138 | `(("python-autobahn" ,python-autobahn) | |
139 | ("python-click" ,python-click) | |
140 | ("python-hkdf" ,python-hkdf) | |
141 | ("python-humanize" ,python-humanize) | |
142 | ("python-pynacl" ,python-pynacl) | |
143 | ("python-spake2" ,python-spake2) | |
144 | ("python-tqdm" ,python-tqdm) | |
145 | ("python-twisted" ,python-twisted) | |
146 | ("python-txtorcon" ,python-txtorcon))) | |
147 | (home-page "https://github.com/warner/magic-wormhole") | |
148 | (synopsis "Securely transfer data between computers") | |
149 | (description "Magic-Wormhole is a library and a command-line tool named | |
150 | wormhole, which makes it possible to securely transfer arbitrary-sized files and | |
151 | directories (or short pieces of text) from one computer to another. The two | |
152 | endpoints are identified by using identical \"wormhole codes\": in general, the | |
153 | sending machine generates and displays the code, which must then be typed into | |
154 | the receiving machine. | |
155 | ||
156 | The codes are short and human-pronounceable, using a phonetically-distinct | |
157 | wordlist. The receiving side offers tab-completion on the codewords, so usually | |
158 | only a few characters must be typed. Wormhole codes are single-use and do not | |
159 | need to be memorized.") | |
160 | (license expat))) |