~ruther/guix-local

e9d7f7fb0cc34c3087be1406ac318c0cffe8ab3f — Sharlatan Hellseher a month ago 0a18384
gnu: Add python-siphash24.

* gnu/packages/python-xyz.scm (python-siphash24): New variable.

Change-Id: I297103197b867e9be3a60caf53a8536f5c32aa63
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
1 files changed, 47 insertions(+), 0 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +47 -0
@@ 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")