summaryrefslogtreecommitdiff
path: root/gnu/packages/python-crypto.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-crypto.scm')
-rw-r--r--gnu/packages/python-crypto.scm71
1 files changed, 31 insertions, 40 deletions
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 50e7d25c8b..2d865a92b3 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -884,14 +884,29 @@ through the Engine interface.")
"1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f)) ;FIXME: unable to find libraries
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'hard-code-path-to-libscrypt
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libscrypt (assoc-ref inputs "libscrypt")))
+ (substitute* "pylibscrypt/pylibscrypt.py"
+ (("find_library\\('scrypt'\\)")
+ (string-append "'" libscrypt "/lib/libscrypt.so'")))
+ #t))))
+ ;; The library can use various scrypt implementations and tests all of
+ ;; them. Since we only provide a single implementation, most tests
+ ;; fail. Simply skip them.
+ #:tests? #f))
+ ;; FIXME: Using "libscrypt" is the second best choice. The best one
+ ;; requires "hashlib.scrypt", provided by Python 3.6+ built with OpenSSL
+ ;; 1.1+. Use that as soon as Guix provides it.
(inputs
- `(("openssl" ,openssl)))
+ `(("libscrypt" ,libscrypt)))
(home-page "https://github.com/jvarho/pylibscrypt")
(synopsis "Scrypt for Python")
(description "There are a lot of different scrypt modules for Python, but
none of them have everything that I'd like, so here's one more. It uses
-hashlib.scrypt on Python 3.6 and OpenSSL 1.1.")
+@code{libscrypt}.")
(license license:isc)))
(define-public python-libnacl
@@ -929,46 +944,22 @@ been constructed to maintain extensive documentation on how to use
@code{NaCl} as well as being completely portable.")
(license license:asl2.0)))
-(define-public python-duniterpy
+(define-public python-scrypt
(package
- (name "python-duniterpy")
- (version "0.43.2")
+ (name "python-scrypt")
+ (version "0.8.6")
(source
(origin
- (method git-fetch)
- ;; Pypi's default URI is missing "requirements.txt" file.
- (uri (git-reference
- (url "https://github.com/duniter/duniter-python-api.git")
- (commit version)))
- (file-name (git-file-name name version))
+ (method url-fetch)
+ (uri (pypi-uri "scrypt" version))
(sha256
(base32
- "1ch4f150k1p1l876pp08p5rxqhpv5xfbxdw6njcmr06hspv8v8x4"))))
+ "0b9nw10hfdl0jflm3b62q485ssc3f3f33lpg4yy407gs8wnrn8zq"))))
(build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- ;; Among 108 tests, a single one is failing: FAIL:
- ;; test_from_pubkey. Remove it.
- (add-after 'unpack 'remove-failing-test
- (lambda _
- (delete-file "tests/documents/test_crc_pubkey.py")
- #t)))))
- (propagated-inputs
- `(("python-aiohttp" ,python-aiohttp)
- ("python-base58" ,python-base58)
- ("python-jsonschema" ,python-jsonschema)
- ("python-libnacl" ,python-libnacl)
- ("python-pylibscrypt" ,python-pylibscrypt)
- ("python-pypeg2" ,python-pypeg2)))
- (home-page "https://github.com/duniter/duniter-python-api")
- (synopsis "Python implementation of Duniter API")
- (description "@code{duniterpy} is an implementation of
-@uref{https://github.com/duniter/duniter/, duniter} API. Its
-main features are:
-@itemize
-@item Supports Duniter's Basic Merkle API and protocol
-@item Asynchronous
-@item Duniter signing key
-@end itemize")
- (license license:gpl3+)))
+ (inputs
+ `(("openssl" ,openssl)))
+ (home-page "http://bitbucket.org/mhallin/py-scrypt")
+ (synopsis "Bindings for the scrypt key derivation function library")
+ (description "This is a set of Python bindings for the scrypt key
+derivation function.")
+ (license license:bsd-2)))