summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2026-01-09 09:51:32 +0000
committerRutherther <rutherther@ditigal.xyz>2026-01-25 21:22:21 +0100
commite9d7f7fb0cc34c3087be1406ac318c0cffe8ab3f (patch)
treecad065e757e26a3e4e986bbbbe3b569108017b46 /gnu/packages
parent0a1838450b848bcd80bb967d1c052f1ea7dedafd (diff)
gnu: Add python-siphash24.
* gnu/packages/python-xyz.scm (python-siphash24): New variable. Change-Id: I297103197b867e9be3a60caf53a8536f5c32aa63 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5a7d239b5bc..8d007c26eae 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -211,6 +211,7 @@
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages c)
#:use-module (gnu packages cpp)
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
@@ -2445,6 +2446,52 @@ three consecutive points in a polyline or polygon
@end itemize")
(license license:expat)))
+(define-public python-siphash24
+ (package
+ (name "python-siphash24")
+ (version "1.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dnicolodi/python-siphash24/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0i75mrm2w10njxqb3g1kp9v8r5d22a0v8vc68v0k8c7l3ncf0lp7"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-backend #~'custom
+ #:test-flags #~(list "test.py")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-pyproject
+ (lambda _
+ (substitute* "pyproject.toml"
+ ;; meson-python: error: Field `project.license` has an invalid
+ ;; type, expecting a dictionary of strings (got `Apache-2.0 OR
+ ;; LGPL-2.1-or-later`)
+ (("^license = .*")
+ "license = {text = \"Apache-2.0 OR LGPL-2.1-or-later\"}\n")))))))
+ (native-inputs
+ (list meson-python
+ pkg-config
+ python-cython
+ python-pytest))
+ (inputs
+ (list c-siphash))
+ (home-page "https://github.com/dnicolodi/python-siphash24/")
+ (synopsis "Streaming-capable SipHash-1-3 and SipHash-2-4 Implementation")
+ (description
+ "This package provides a C-based implementation of
+@url{https://cr.yp.to/siphash/siphash-20120918.pdf, SipHash} with an interface
+compatible with the hash functions provided by the hashlib standard library
+module. SipHash-1-3 and SipHash-2-4 variants are currently implemented.")
+ ;; They are in LICENSES directory:
+ (license (list license:asl2.0
+ license:lgpl2.1+))))
+
(define-public python-snakesay
(package
(name "python-snakesay")