| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | (define-module (gnu packages digest)
|
| 23 | #:use-module (guix gexp)
|
| 24 | #:use-module ((guix licenses) #:prefix license:)
|
| 25 | #:use-module (guix packages)
|
| 26 | #:use-module (guix download)
|
| 27 | #:use-module (guix git-download)
|
| 28 | #:use-module (guix build-system gnu)
|
| 29 | #:use-module (guix build-system pyproject)
|
| 30 | #:use-module (guix build-system trivial)
|
| 31 | #:use-module (guix utils)
|
| 32 | #:use-module (gnu packages check)
|
| 33 | #:use-module (gnu packages python-build)
|
| 34 | #:use-module (gnu packages python-xyz)
|
| 35 | #:use-module (ice-9 match))
|
| 36 |
|
| 37 | (define-public python-tdigest
|
| 38 | (package
|
| 39 | (name "python-tdigest")
|
| 40 | (version "0.6.0.1")
|
| 41 | (source
|
| 42 | (origin
|
| 43 | (method git-fetch)
|
| 44 | (uri (git-reference
|
| 45 | (url "https://github.com/CamDavidsonPilon/tdigest")
|
| 46 | (commit (string-append "v" version))))
|
| 47 | (file-name (git-file-name name version))
|
| 48 | (sha256
|
| 49 | (base32 "1fqpjw27fc1xfx72c2rjbnmi290f4c262rwm0c2fifsxpwyy54w7"))))
|
| 50 | (build-system pyproject-build-system)
|
| 51 | (propagated-inputs (list python-accumulation-tree python-pyudorandom))
|
| 52 | (native-inputs (list python-numpy
|
| 53 | python-pytest
|
| 54 | python-pytest-timeout
|
| 55 | python-setuptools))
|
| 56 | (home-page "https://github.com/CamDavidsonPilon/tdigest")
|
| 57 | (synopsis "Python implementation of the t-digest data structure")
|
| 58 | (description
|
| 59 | "This Python package implements @url{https://github.com/tdunning/t-digest,
|
| 60 | Ted Dunning's t-digest data structure}, which is designed around computing
|
| 61 | accurate estimates such as percentiles, quantiles and trimmed means
|
| 62 | from streaming or distributed data. Two t-digests can be added,
|
| 63 | making the data structure ideal for map-reduce settings, and can be serialized
|
| 64 | into much less than 10 kB, instead of storing the entire list of data.")
|
| 65 | (license license:expat)))
|
| 66 |
|
| 67 | (define-public wyhash
|
| 68 | (package
|
| 69 | (name "wyhash")
|
| 70 | (version "5")
|
| 71 | (source (origin
|
| 72 | (method git-fetch)
|
| 73 | (uri (git-reference
|
| 74 | (url "https://github.com/wangyi-fudan/wyhash")
|
| 75 | (commit (string-append "wyhash_v" version))))
|
| 76 | (file-name (git-file-name name version))
|
| 77 | (sha256
|
| 78 | (base32 "03ljs5iw9zrm3bydwggjvpwrcwmsd75h3dv1j4am4hw3h22cjdjc"))))
|
| 79 | (build-system trivial-build-system) |
| 80 | (arguments
|
| 81 | `(#:modules ((guix build utils))
|
| 82 | #:builder
|
| 83 | (begin
|
| 84 | (use-modules (guix build utils))
|
| 85 | (let* ((out (string-append (assoc-ref %outputs "out")))
|
| 86 | (include (string-append out "/include"))
|
| 87 | (doc (string-append out "/share/doc/" ,name "-" ,version))
|
| 88 | (source (assoc-ref %build-inputs "source")))
|
| 89 | (with-directory-excursion source
|
| 90 | (install-file "wyhash.h" include)
|
| 91 | (install-file "LICENSE" doc)
|
| 92 | (install-file "README.md" doc))
|
| 93 | #t))))
|
| 94 | (home-page "https://github.com/wangyi-fudan/wyhash")
|
| 95 | (synopsis "Embeddable hash function and random number generator")
|
| 96 | (description "This package provides a portable hash function and random
|
| 97 | number generator suitable for use in data structures. Provided by default in
|
| 98 | Zig, V, and Nim programming language standard libraries.")
|
| 99 | (license license:unlicense)))
|
| 100 |
|
| 101 | (define-public xxhash
|
| 102 | (package
|
| 103 | (name "xxhash")
|
| 104 | (version "0.8.3")
|
| 105 | (source
|
| 106 | (origin
|
| 107 | (method git-fetch)
|
| 108 | (uri (git-reference
|
| 109 | (url "https://github.com/Cyan4973/xxHash")
|
| 110 | (commit (string-append "v" version))))
|
| 111 | (file-name (git-file-name name version))
|
| 112 | (sha256
|
| 113 | (base32 "017py6m7rs7pr2f8j1xfyg0bc4b0biv12k8zylyg9ildry22iac7"))))
|
| 114 | (build-system gnu-build-system)
|
| 115 | (arguments
|
| 116 | (list #:make-flags
|
| 117 | #~(list #$(string-append "CC=" (cc-for-target))
|
| 118 | "XXH_FORCE_MEMORY_ACCESS=1" |
| 119 | (string-append "prefix=" (assoc-ref %outputs "out")))
|
| 120 | #:phases
|
| 121 | #~(modify-phases %standard-phases
|
| 122 | (delete 'configure)))) |
| 123 | (home-page "https://cyan4973.github.io/xxHash/")
|
| 124 | (synopsis "Extremely fast hash algorithm")
|
| 125 | (description
|
| 126 | "xxHash is an extremely fast non-cryptographic hash algorithm. It works
|
| 127 | at speeds close to RAM limits, and comes in both 32- and 64-bit flavours.
|
| 128 | The code is highly portable, and hashes of the same length are identical on all
|
| 129 | platforms (both big and little endian).")
|
| 130 | (license (list license:bsd-2 |
| 131 | license:gpl2+)))) |
| 132 |
|
| 133 | (define-public python-xxhash
|
| 134 | (package
|
| 135 | (name "python-xxhash")
|
| 136 | (version "3.5.0")
|
| 137 | (source
|
| 138 | (origin
|
| 139 | (method url-fetch)
|
| 140 | (uri (pypi-uri "xxhash" version))
|
| 141 | (sha256
|
| 142 | (base32 "0pxlc37x0rrw3vl8yhf638wqcpfg9jfsh8ifvkwcpjaiz7fwmwl4"))))
|
| 143 | (build-system pyproject-build-system)
|
| 144 | (arguments
|
| 145 | (list
|
| 146 | #:test-backend #~'unittest
|
| 147 | #:phases
|
| 148 | #~(modify-phases %standard-phases
|
| 149 | (add-before 'check 'build-extensions
|
| 150 | (lambda _
|
| 151 | (invoke "python" "setup.py" "build_ext" "--inplace"))))))
|
| 152 | (native-inputs
|
| 153 | (list python-setuptools))
|
| 154 | (home-page "https://github.com/ifduyue/python-xxhash")
|
| 155 | (synopsis "Python binding for xxHash")
|
| 156 | (description "This package provides Python bindings for the xxHash hash
|
| 157 | algorithm.")
|
| 158 | (license license:bsd-3)))
|