[bug#34515,11/13] gnu: Add magic-wormhole-mailbox-server.

Message ID ebcb0f485fe442a20a400f0c119c4e9a6a38a7ef.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: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk                    |  1 +
 gnu/packages/magic-wormhole.scm | 59 +++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)
 create mode 100644 gnu/packages/magic-wormhole.scm

Comments

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

> * gnu/packages/magic-wormhole.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Okay.

> +    (arguments
> +      ;; Tests seem to be Python 2 only...
> +      ;; "TypeError: a bytes-like object is required, not 'str'"
> +     '(#:tests? #f))

This seems to be a problem with Python 3.7.  Scons suffers from the same
problem.

Could it be that the tests use the “imp” module?  If so they might be
fixed by using importlib instead.

> +    (synopsis "Magic-Wormhole central server")

Maybe “Magic-Wormhole central mailbox server”?

LGTM!

--
Ricardo
Leo Famulari Feb. 19, 2019, 4:43 a.m. UTC | #2
On Mon, Feb 18, 2019 at 09:44:27AM +0100, Ricardo Wurmus wrote:
> Leo Famulari <leo@famulari.name> writes:
> > +    (arguments
> > +      ;; Tests seem to be Python 2 only...
> > +      ;; "TypeError: a bytes-like object is required, not 'str'"
> > +     '(#:tests? #f))
> 
> This seems to be a problem with Python 3.7.  Scons suffers from the same
> problem.
> 
> Could it be that the tests use the “imp” module?  If so they might be
> fixed by using importlib instead.

Thanks for this tip. I dug in and couldn't find such an import, but I
realized that the test failure was caused by missing network access. The
"bytes-like object" message must come from some error handler. I worked
around it by skipping the test in question.

> > +    (synopsis "Magic-Wormhole central server")
> 
> Maybe “Magic-Wormhole central mailbox server”?

Good idea, thanks!

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ce43db3c1d..4c570b9e5f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -296,6 +296,7 @@  GNU_SYSTEM_MODULES =				\
   %D%/packages/m4.scm				\
   %D%/packages/machine-learning.scm		\
   %D%/packages/man.scm				\
+  %D%/packages/magic-wormhole.scm		\
   %D%/packages/mail.scm				\
   %D%/packages/make-bootstrap.scm		\
   %D%/packages/markup.scm			\
diff --git a/gnu/packages/magic-wormhole.scm b/gnu/packages/magic-wormhole.scm
new file mode 100644
index 0000000000..fd38fba0e8
--- /dev/null
+++ b/gnu/packages/magic-wormhole.scm
@@ -0,0 +1,59 @@ 
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(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
+      ;; Tests seem to be Python 2 only...
+      ;; "TypeError: a bytes-like object is required, not 'str'"
+     '(#:tests? #f))
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-autobahn" ,python-autobahn)
+       ("python-hyperlink" ,python-hyperlink)
+       ("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 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)))