guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add Gajim.


From: Mark H Weaver
Subject: Re: [PATCH] Add Gajim.
Date: Wed, 23 Sep 2015 22:59:32 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ricardo Wurmus <address@hidden> writes:

> this patch series adds the XMPP client Gajim.  PGP support only works
> with the “classic” GnuPG (version 1.4).
>
> I had to disable a few tests in pyOpenSSL and python-gnupg.  The vast
> majority of the tests pass, though, and I’ve been using Gajim with GnuPG
> successfully for almost two days.

Sounds good!  Please see below for comments.

> From da68312f5dfa26bf9d0bb93288b78c68c85c17ee Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Mon, 21 Sep 2015 22:41:53 +0200
> Subject: [PATCH 01/11] gnu: python-cffi: Update to 1.2.1.

Looks good to me.

> From 8ba400c2392449095094613bd49de6c8dc750c62 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Mon, 21 Sep 2015 22:43:24 +0200
> Subject: [PATCH 02/11] gnu: Add python-pyasn1.

Okay.

> From b4c1ec4386cd6cde03cd616c1f34384cee99c74e Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Mon, 21 Sep 2015 22:44:02 +0200
> Subject: [PATCH 03/11] gnu: Add python-ipaddress.
>
> * gnu/packages/python.scm (python-ipaddress, python2-ipaddress): New
>   variables.
> ---
>  gnu/packages/python.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 40d31a7..0f0a162 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -4939,3 +4939,27 @@ suitable for a wide range of protocols based on the 
> ASN.1 specification.")
>  
>  (define-public python2-pyasn1
>    (package-with-python2 python-pyasn1))
> +
> +(define-public python-ipaddress
> +  (package
> +    (name "python-ipaddress")
> +    (version "1.0.14")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://pypi.python.org/packages/source/i/";
> +                           "ipaddress/ipaddress-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
> +    (build-system python-build-system)
> +    (arguments `(#:tests? #f)) ; no tests
> +    (home-page "https://github.com/phihag/ipaddress";)
> +    (synopsis "IP address manipulation library")
> +    (description
> +     "This is a port of the Python 3.3 ipaddress module to older versions of
> +Python.")

Hmm, but we already have Python 3.4, and this package seems to be built
with it, so I'm confused :)

In any case, it would be good to describe what the ipaddress module does
here, instead of simply saying that it's a backport.

> From 1bb13ec51cc24f30b42df0a179d6ee59415235f4 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Mon, 21 Sep 2015 22:44:32 +0200
> Subject: [PATCH 04/11] gnu: Add python-idna.

Okay.

> From 6bbf9b63616d4e3d4098e51ac1ea63ec95d5335e Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Mon, 21 Sep 2015 22:45:19 +0200
> Subject: [PATCH 05/11] gnu: Add python-pretend.
>
> * gnu/packages/python.scm (python-pretend, python2-pretend): New
>   variables.
> ---
>  gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 672c2c6..93e6a17 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -4993,3 +4993,30 @@ specification.")
>  
>  (define-public python2-idna
>    (package-with-python2 python-idna))
> +
> +(define-public python-pretend
> +  (package
> +    (name "python-pretend")
> +    (version "1.0.8")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://pypi.python.org/packages/source/p/";
> +                           "pretend/pretend-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
> +    (build-system python-build-system)
> +    (native-inputs
> +     `(("python-setuptools" ,python-setuptools)))
> +    (home-page "https://github.com/alex/pretend";)
> +    (synopsis "Library for stubbing in Python")
> +    (description
> +     "Pretend is a library to make stubbing with Python easier.  Stubbing is 
> a
> +technique for writing tests.  You may hear the term mixed up with mocks,
> +fakes, or doubles. Basically a stub is an object that returns pre-canned

Two spaces between sentences, please.  Otherwise looks good to me.

> From e48b89c864fe59fe59b8a617f6600231d0effe55 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Mon, 21 Sep 2015 22:45:42 +0200
> Subject: [PATCH 06/11] gnu: Add python-cryptography-vectors.
>
> * gnu/packages/python.scm (python-cryptography-vectors,
>   python2-cryptography-vectors): New variables.
> ---
>  gnu/packages/python.scm | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 93e6a17..17fa3ee 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -5020,3 +5020,29 @@ responses, rather than doing any computation.")
>  
>  (define-public python2-pretend
>    (package-with-python2 python-pretend))
> +
> +(define-public python-cryptography-vectors
> +  (package
> +    (name "python-cryptography-vectors")
> +    (version "1.0.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://pypi.python.org/packages/source/c/";
> +                           "cryptography-vectors/cryptography_vectors-"
> +                           version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "1i2chlyhlx4792di82fqzcy9wz0gnnc661bj46zr794ip4629sp4"))))
> +    (build-system python-build-system)
> +    (native-inputs
> +     `(("python-setuptools" ,python-setuptools)))
> +    (home-page "https://github.com/pyca/cryptography";)
> +    (synopsis "Test vectors for the cryptography package.")
> +    (description
> +      "This package contains test vectors for the cryptography package.")
> +    ;; Distributed under either BSD-3 or ASL2.0
> +    (license bsd-3)))

So shouldn't it be (license (list bsd-3 asl2.0)) ?

> From 678b5402e9a226383abbd5d2e560d3f609d719e6 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Mon, 21 Sep 2015 22:46:11 +0200
> Subject: [PATCH 07/11] gnu: Add python-cryptography.
>
> * gnu/packages/python.scm (python-cryptography, python2-cryptography):
>   New variables.
> ---
>  gnu/packages/python.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 17fa3ee..728c8d4 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -5046,3 +5046,45 @@ responses, rather than doing any computation.")
>  
>  (define-public python2-cryptography-vectors
>    (package-with-python2 python-cryptography-vectors))
> +
> +(define-public python-cryptography
> +  (package
> +    (name "python-cryptography")
> +    (version "1.0.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://pypi.python.org/packages/source/c/";
> +                           "cryptography/cryptography-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "1lxzvhlyl6h6nm77n34622rcj2cxnx220x9vgjlw76wjd8m0kqyg"))))
> +    (build-system python-build-system)
> +    (inputs
> +     `(("openssl" ,openssl)))
> +    (propagated-inputs
> +     `(("python-cffi" ,python-cffi)
> +       ("python-six" ,python-six)
> +       ("python-pyasn1" ,python-pyasn1)
> +       ("python-ipaddress" ,python-ipaddress)
> +       ("python-enum34" ,python-enum34)
> +       ("python-idna" ,python-idna)
> +       ("python-iso8601" ,python-iso8601)))
> +    (native-inputs
> +     `(("python-cryptography-vectors" ,python-cryptography-vectors)
> +       ("python-setuptools" ,python-setuptools)
> +       ("python-pretend" ,python-pretend)
> +       ("python-pytest" ,python-pytest)))
> +    (home-page "https://github.com/pyca/cryptography";)
> +    (synopsis "Cryptographic recipes and primitives for Python")
> +    (description
> +      "cryptography is a package which provides cryptographic recipes and
> +primitives to Python developers.  It aims to be the “cryptographic standard
> +library” for Python.  The package includes both high level recipes, and low
> +level interfaces to common cryptographic algorithms such as symmetric 
> ciphers,
> +message digests and key derivation functions.")
> +    ;; Distributed under either BSD-3 or ASL2.0
> +    (license bsd-3)))

Ditto.

> From 2d4caf042f61c6f737c10c458829e44ecd6f65b5 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Wed, 23 Sep 2015 09:52:44 +0200
> Subject: [PATCH 08/11] gnu: Add pyOpenSSL.

Okay.

> From 201146eb25a17b1e48df8daf65fe59d73dca2c9f Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Wed, 23 Sep 2015 21:27:28 +0200
> Subject: [PATCH 09/11] gnu: Add python-gnupg.
>
> * gnu/packages/gnupg.scm (python-gnupg, python2-gnupg): New variables.
> ---
>  gnu/packages/gnupg.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
>
> diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
> index 5882617..3ac2488 100644
> --- a/gnu/packages/gnupg.scm
> +++ b/gnu/packages/gnupg.scm
> @@ -325,6 +325,49 @@ instead.  This way bug fixes or improvements can be done 
> at a central place
>  and every application benefits from this.")
>      (license license:lgpl2.1+)))
>  
> +(define-public python-gnupg
> +  (package
> +    (name "python-gnupg")
> +    (version "0.3.7")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://pypi.python.org/packages/source/p/";
> +                           "python-gnupg/python-gnupg-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "1hg9gshk4b7raskj8mjadsjcv10axlx2z4xl4ag2f2bpi4f8chvq"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +                  (lambda* (#:key inputs #:allow-other-keys)
> +                    (substitute* "test_gnupg.py"
> +                      ;; Test keyrings are missing, so this test fails.
> +                      (("'test_scan_keys'") "True")
> +                      (("def test_scan_keys") "def disabled__scan_keys")
> +                      ;; Unsure why this test fails.
> +                      (("'test_search_keys'") "True")
> +                      (("def test_search_keys") "def disabled__search_keys"))
> +                    (setenv "GPGBINARY" (which "gpg"))
> +                    (setenv "USERNAME" "guixbuilder")

Why "guixbuilder"?  I don't think that name has any significance within
the build environment, does it?

> +                    ;; The doctests are extremely slow and sometimes time 
> out,
> +                    ;; so we disable them.
> +                    (zero? (system* (which "python")

This could just be "python" (without the call to 'which'), I think.
Ditto for GPGBINARY, although I guess it's not important.

> From 838797920e5f1e3d88ad80adcc27e05daa518e25 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Wed, 23 Sep 2015 21:29:06 +0200
> Subject: [PATCH 10/11] gnu: Add python-nbxmpp.

Okay.

> From b7e3cf9a556e479ffb92f45d7908a402eba0274d Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Wed, 23 Sep 2015 21:50:27 +0200
> Subject: [PATCH 11/11] gnu: Add Gajim.
>
> * gnu/packages/messaging.scm (gajim): New variable.
> ---
>  gnu/packages/messaging.scm | 49 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
>
> diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
> index 6471501..fd42c13 100644
> --- a/gnu/packages/messaging.scm
> +++ b/gnu/packages/messaging.scm
> @@ -421,4 +421,53 @@ was initially a fork of xmpppy, but is using 
> non-blocking sockets.")
>  (define-public python2-nbxmpp
>    (package-with-python2 python-nbxmpp))
>  
> +(define-public gajim
> +  (package
> +    (name "gajim")
> +    (version "0.16.3")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://gajim.org/downloads/";
> +                                  "0.16" "/gajim-" version ".tar.bz2"))

Please use (version-major+minor version) instead of "0.16" here.

> +              (sha256
> +               (base32
> +                "05a59hf9wna6n9fi0a4bhz1hifqj21bwb4ff9rd0my23rdwmij51"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'wrap-program
> +          (lambda* (#:key inputs outputs #:allow-other-keys)

'inputs' is unused here.

> +            ;; Make sure all Python scripts run with the correct PYTHONPATH.
> +            (let* ((out (assoc-ref outputs "out"))
> +                   (path (getenv "PYTHONPATH")))

This could be 'let' instead of 'let*'.

> +              (for-each (lambda (name)
> +                          (let ((file (string-append out "/bin/" name)))
> +                            ;; Wrapping destroys identification of intended
> +                            ;; application, so we need to override "APP".
> +                            (substitute* file
> +                              (("APP=`basename \\$0`")
> +                               (string-append "APP=" name)))
> +                            (wrap-program file
> +                              `("PYTHONPATH" ":" prefix (,path)))))
> +                        '("gajim" "gajim-remote" "gajim-history-manager")))
> +            #t)))))
> +    (native-inputs
> +     `(("intltool" ,intltool)))
> +    (propagated-inputs
> +     `(("python2-nbxmpp" ,python2-nbxmpp)
> +       ("python2-pyopenssl" ,python2-pyopenssl)
> +       ("python2-gnupg" ,python2-gnupg)))
> +    (inputs
> +     `(("python2-pygtk" ,python2-pygtk)
> +       ("python" ,python-2)))
> +    (home-page "https://gajim.org/";)
> +    (synopsis "Jabber (XMPP) client")
> +    (description "Gajim is a feature-rich and easy to use Jabber/XMPP client.
> +Among its features are: a tabbed chat window and single window modes; support
> +for group chat (with Multi-User Chat protocol), invitation, chat to group 
> chat
> +transformation; audio and video conferences; file transfer; TLS, GPG and
> +end-to-end encryption support; XML console.")
> +    (license gpl3+)))
> +
>  ;;; messaging.scm ends here

Otherwise looks good.

   Thank you!
      Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]