all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rutger Helling <rhelling@mykolab.com>
To: Marius Bakke <mbakke@fastmail.com>
Cc: 29130@debbugs.gnu.org
Subject: [bug#29130] [PATCH] gnu: networking: Add websockify.
Date: Mon, 06 Nov 2017 10:39:09 +0100	[thread overview]
Message-ID: <634add68dfb10878520c434f30249885@mykolab.com> (raw)
In-Reply-To: <87d14whgom.fsf@fastmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2360 bytes --]

Hey Marius, 

thanks for the review. Here's an updated patch. Unfortunately two out of
six tests fail due to an ImportError.
The module 'stubout' should be imported from python-mox3 but for some
reason isn't.
I'll try and find a solution at a later date, but for now I've disabled
the tests and added a FIXME. 

On 2017-11-05 16:46, Marius Bakke wrote:

> Rutger Helling <rhelling@mykolab.com> writes:
> 
>> Hey Guix, 
>> 
>> here's a patch that adds websockify.
> 
> Thanks for this!
> 
> [...]
> 
>> +(define-public websockify
>> +  (package
>> +    (name "websockify")
>> +    (version "0.8.0")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "https://github.com/novnc/websockify/archive/v"
>> +                                  version "/archive.tar.gz"))
>> +              (file-name (string-append name "-" version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                "1kjq6gibsvbb6zx5gi8hgh7110x62pbwcqkwapf3k7s27w5y907h"))))
>> +    (build-system python-build-system)
>> +    (inputs `(("python-numpy", python-numpy)))
> 
> "python-numpy" needs to be a propagated-input, since it is imported by
> the installed library.  Otherwise packages using the websockify library
> won't be able to find 'numpy'.
> 
>> +    (home-page "https://github.com/novnc/websockify")
> 
> I noticed this package has a '.travis.yml' that runs 'python setup.py
> nosetests' for tests -- currently the 'check' phase just prints "Ran 0
> tests in 0.00s".  Can you try overriding the check phase with one that
> runs the same command?
> 
>> +    (synopsis "WebSockets support for any application/server")
>> +    (description "Websockify translates WebSockets traffic to normal socket
>> +traffic.  Websockify accepts the WebSockets handshake, parses it, and then
>> +begins forwarding traffic between the client and the target in both
>> +directions.")
>> +;; websockify is licensed under the LGPL version 3 with the following
>> +;; exceptions:
>> +;; include/websock.js : MPL 2.0
>> +;; include/base64.js : MPL 2.0
>> +;; include/des.js : Various BSD style licenses
>> +;; include/web-socket-js/ : New BSD license (3-clause).
>> +;; other/kumina.c : Simplified BSD license (2 clause).
>> +    (license license:lgpl3)))
> 
> Indeed version 3 only.
> 
> Can you send an updated patch please? :)

[-- Attachment #1.2: Type: text/html, Size: 4379 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-networking-Add-websockify-v2.patch --]
[-- Type: text/x-diff; name=0001-gnu-networking-Add-websockify-v2.patch, Size: 2435 bytes --]

From eac151a0c5c82f50c94b3581af0679e33d127805 Mon Sep 17 00:00:00 2001
From: Rutger Helling <rhelling@mykolab.com>
Date: Mon, 6 Nov 2017 10:32:05 +0100
Subject: [PATCH] gnu: networking: Add websockify.

* gnu/packages/networking.scm (websockify): New variable.
---
 gnu/packages/networking.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 57b32c252..3f7d0a74c 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -68,6 +68,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages kerberos)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages openstack)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -1535,3 +1536,32 @@ at the IP layer and link layer, as well as a host of supplementary
 functionality.  Using libnet, quick and simple packet assembly applications
 can be whipped up with little effort.")
     (license license:bsd-2)))
+
+(define-public websockify
+  (package
+    (name "websockify")
+    (version "0.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/novnc/websockify/archive/v"
+                                  version "/archive.tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1kjq6gibsvbb6zx5gi8hgh7110x62pbwcqkwapf3k7s27w5y907h"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ; FIXME: 2 out of 6 tests fail with "ImportError: No module
+     ; named 'stubout'". The tests can be run by replacing the check phase with
+     ; the command "python setup.py nosetests --verbosity=3".
+    (native-inputs `(; Required for tests:
+                     ("python-mox3", python-mox3)
+                     ("python-nose", python-nose)))
+    (propagated-inputs `(("python-numpy", python-numpy)))
+    (home-page "https://github.com/novnc/websockify")
+    (synopsis "WebSockets support for any application/server")
+    (description "Websockify translates WebSockets traffic to normal socket
+traffic.  Websockify accepts the WebSockets handshake, parses it, and then
+begins forwarding traffic between the client and the target in both
+directions.")
+    (license license:lgpl3)))
-- 
2.15.0


  reply	other threads:[~2017-11-06  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 10:06 [bug#29130] [PATCH] gnu: networking: Add websockify Rutger Helling
2017-11-05 15:46 ` Marius Bakke
2017-11-06  9:39   ` Rutger Helling [this message]
2017-11-07 21:00     ` bug#29130: " Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=634add68dfb10878520c434f30249885@mykolab.com \
    --to=rhelling@mykolab.com \
    --cc=29130@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.