[bug#34515,12/13] gnu: Add magic-wormhole-transit-relay.

Message ID 4e03d0f28d2967e794c1df200070391ae7006e54.1550437064.git.leo@famulari.name
State Accepted
Headers show
Series [bug#34515,01/13] gnu: Add python-humanize. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Leo Famulari Feb. 17, 2019, 8:57 p.m. UTC
* gnu/packages/magic-wormhole.scm (magic-wormhole-transit-relay): New variable.
---
 gnu/packages/magic-wormhole.scm | 42 +++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Comments

Ricardo Wurmus Feb. 18, 2019, 8:48 a.m. UTC | #1
Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/magic-wormhole.scm (magic-wormhole-transit-relay): New variable.

LGTM!

Patch

diff --git a/gnu/packages/magic-wormhole.scm b/gnu/packages/magic-wormhole.scm
index fd38fba0e8..cc97fec3f9 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))
@@ -57,3 +58,44 @@  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-hyperlink" ,python-hyperlink)
+       ("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)))
+