unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 31241@debbugs.gnu.org
Subject: [bug#31241] [PATCH 11/13] gnu: Add python-libnacl.
Date: Mon, 23 Apr 2018 01:04:18 +0200	[thread overview]
Message-ID: <20180422230420.30818-11-mail@nicolasgoaziou.fr> (raw)
In-Reply-To: <20180422230420.30818-1-mail@nicolasgoaziou.fr>

* gnu/packages/python-crypto.scm (python-libnacl): New variable.
---
 gnu/packages/python-crypto.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index e8a209735..41b6d5869 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -861,3 +861,37 @@ through the Engine interface.")
     (synopsis "Scrypt for Python")
     (description "Scrypt for Python")
     (license license:isc)))
+
+(define-public python-libnacl
+  (package
+    (name "python-libnacl")
+    (version "1.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "libnacl" version))
+       (sha256
+        (base32
+         "0nv7n8nfswkhl614x5mllrkvaslraa0053q11iylb337cy43vb4v"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'locate-libsodium
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "libnacl/__init__.py"
+               (("(return ctypes.cdll.LoadLibrary\\(')libsodium.so('\\))"
+                 _ pre post)
+                (let ((libsodium (string-append (assoc-ref inputs "libsodium")
+                                                "/lib/libsodium.so")))
+                  (string-append pre libsodium post)))))))))
+    (propagated-inputs
+     `(("libsodium" ,libsodium)
+       ("python-pyhamcrest" ,python-pyhamcrest)))
+    (home-page "https://libnacl.readthedocs.org/")
+    (synopsis "Python bindings for libsodium based on ctypes")
+    (description "@code{libnacl} is used to gain direct access to the
+functions exposed by @code{NaCl} library via @code{libsodium}.  It has
+been constructed to maintain extensive documentation on how to use
+@code{NaCl} as well as being completely portable.")
+    (license license:asl2.0)))
-- 
2.17.0

  parent reply	other threads:[~2018-04-22 23:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-22 23:01 [bug#31241] [PATCH 00/13] Add Duniter's bindings for Python Nicolas Goaziou
2018-04-22 23:04 ` [bug#31241] [PATCH 01/13] gnu: python-attrs: Update to 17.4.0 Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 02/13] gnu: Add python-async-generator Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 03/13] gnu: Add python-pycares Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 04/13] gnu: Add python-async-timeout Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 05/13] gnu: Add python-idna-ssl Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 06/13] gnu: Add python-base58 Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 07/13] gnu: Add python-pylibscrypt Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 08/13] gnu: Add python-multidict Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 09/13] gnu: Add python-aiodns Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 10/13] gnu: Add python-yarl Nicolas Goaziou
2018-04-22 23:04   ` Nicolas Goaziou [this message]
2018-04-22 23:04   ` [bug#31241] [PATCH 12/13] gnu: Add python-aiohttp Nicolas Goaziou
2018-04-22 23:04   ` [bug#31241] [PATCH 13/13] gnu: Add python-duniterpy Nicolas Goaziou
2018-04-26 13:42 ` [bug#31241] [PATCH 00/13] Add Duniter's bindings for Python Ludovic Courtès
2018-05-11 10:07   ` bug#31241: " Nicolas Goaziou

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20180422230420.30818-11-mail@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=31241@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).