From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44542) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE6Z5-0004rp-TA for guix-patches@gnu.org; Tue, 17 Mar 2020 03:23:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jE6Z4-0001o4-MA for guix-patches@gnu.org; Tue, 17 Mar 2020 03:23:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jE6Z4-0001lu-Hv for guix-patches@gnu.org; Tue, 17 Mar 2020 03:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jE6Z4-0003Kn-Dy for guix-patches@gnu.org; Tue, 17 Mar 2020 03:23:02 -0400 Subject: [bug#40100] [PATCH 4/6] gnu: Add python-argon2-cffi. References: <20200317071432.GM927@E5400> In-Reply-To: <20200317071432.GM927@E5400> Resent-Message-ID: From: Efraim Flashner Date: Tue, 17 Mar 2020 09:20:38 +0200 Message-Id: <20200317072040.31229-4-efraim@flashner.co.il> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 40100@debbugs.gnu.org Cc: Efraim Flashner * gnu/packages/python-crypto.scm (python-argon2-cffi): New variable. --- gnu/packages/python-crypto.scm | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 724ec378da..be8f0a9bff 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -47,6 +47,7 @@ #:use-module (gnu packages crypto) #:use-module (gnu packages libffi) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages password-utils) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-check) @@ -1303,3 +1304,46 @@ items and collections, editing items, locking and unlocking collections "This is a low-level, pure Python DBus protocol client. It has an I/O-free core, and integration modules for different event loops.") (license license:expat))) + +(define-public python-argon2-cffi + (package + (name "python-argon2-cffi") + (version "19.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "argon2-cffi" version)) + (sha256 + (base32 + "18xxfw30gi3lwaz4vwb05iavzlrk3fa1x9fippzrgd3px8z65apz")) + (modules '((guix build utils))) + (snippet '(begin (delete-file-recursively "extras") #t)))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + (setenv "ARGON2_CFFI_USE_SYSTEM" "1") + (invoke "python" "setup.py" "build"))) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest") + (invoke "python" "-m" "argon2" "--help") + ;; see tox.ini + (invoke "python" "-m" "argon2" "-n" "1" "-t" "1" "-m" "8" "-p" "1")))))) + (propagated-inputs + `(("python-cffi" ,python-cffi) + ("python-six" ,python-six))) + (inputs `(("argon2" ,argon2))) + (native-inputs + `(("python-hypothesis" ,python-hypothesis) + ("python-pytest" ,python-pytest))) + (home-page "https://argon2-cffi.readthedocs.io/") + (synopsis "Secure Password Hashes for Python") + (description + "Argon2 is a secure password hashing algorithm. It is designed to have +both a configurable runtime as well as memory consumption. This means that you +can decide how long it takes to hash a password and how much memory is required.") + (license license:expat))) -- 2.25.1