From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAO2f-0006xS-D2 for guix-patches@gnu.org; Sun, 22 Apr 2018 19:05:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAO2e-0006ch-Ai for guix-patches@gnu.org; Sun, 22 Apr 2018 19:05:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56598) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAO2e-0006c6-33 for guix-patches@gnu.org; Sun, 22 Apr 2018 19:05:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fAO2d-00022f-Qj for guix-patches@gnu.org; Sun, 22 Apr 2018 19:05:07 -0400 Subject: [bug#31241] [PATCH 11/13] gnu: Add python-libnacl. Resent-Message-ID: From: Nicolas Goaziou Date: Mon, 23 Apr 2018 01:04:18 +0200 Message-Id: <20180422230420.30818-11-mail@nicolasgoaziou.fr> In-Reply-To: <20180422230420.30818-1-mail@nicolasgoaziou.fr> References: <20180422230420.30818-1-mail@nicolasgoaziou.fr> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31241@debbugs.gnu.org * 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