aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/digest.scm
blob: 481771804b9a50637681c471a4dea0c0fa10c106 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Ryan Prior <rprior@protonmail.com>
;;; Copyright © 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages digest)
  #:use-module (guix gexp)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system pyproject)
  #:use-module (guix build-system python)
  #:use-module (guix build-system trivial)
  #:use-module (guix utils)
  #:use-module (gnu packages python-build)
  #:use-module (ice-9 match))

(define-public wyhash
  (package
    (name "wyhash")
    (version "5")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/wangyi-fudan/wyhash")
                    (commit (string-append "wyhash_v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32 "03ljs5iw9zrm3bydwggjvpwrcwmsd75h3dv1j4am4hw3h22cjdjc"))))
    (build-system trivial-build-system) ;; source-only package
    (arguments
     `(#:modules ((guix build utils))
       #:builder
       (begin
         (use-modules (guix build utils))
         (let* ((out (string-append (assoc-ref %outputs "out")))
                (include (string-append out "/include"))
                (doc (string-append out "/share/doc/" ,name "-" ,version))
                (source (assoc-ref %build-inputs "source")))
           (with-directory-excursion source
             (install-file "wyhash.h" include)
             (install-file "LICENSE" doc)
             (install-file "README.md" doc))
           #t))))
    (home-page "https://github.com/wangyi-fudan/wyhash")
    (synopsis "Embeddable hash function and random number generator")
    (description "This package provides a portable hash function and random
number generator suitable for use in data structures.  Provided by default in
Zig, V, and Nim programming language standard libraries.")
    (license license:unlicense)))

(define-public xxhash
  (package
    (name "xxhash")
    ;; XXX Remove the 'fix-man-page-links phase when updating.
    (version "0.8.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/Cyan4973/xxHash")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1h6080lvcr5mpbvy4fhb4i7wvhpy72nrixk3djmpai4hxq41hsnr"))))
    (build-system gnu-build-system)
    (arguments
     (list #:make-flags
           #~(list #$(string-append "CC=" (cc-for-target))
                   #$(match (or (%current-target-system)
                                (%current-system))
                       ;; Detect vector instruction set at run time.
                       ((or "i686-linux" "x86_64-linux") "DISPATCH=1")
                       (_ "DISPATCH=0"))
                   "XXH_FORCE_MEMORY_ACCESS=1" ; improved performance with GCC
                   (string-append "prefix=" (assoc-ref %outputs "out")))
           #:phases
           #~(modify-phases %standard-phases
               (add-after 'unpack 'fix-man-page-links
                 ;; https://github.com/Cyan4973/xxHash/issues/647
                 (lambda _
                   (substitute* "Makefile"
                     (("ln -sf \\$\\(MAN\\)")
                      "ln -sf xxhsum.1"))))
               (delete 'configure))))         ; no configure script
    (home-page "https://cyan4973.github.io/xxHash/")
    (synopsis "Extremely fast hash algorithm")
    (description
     "xxHash is an extremely fast non-cryptographic hash algorithm.  It works
at speeds close to RAM limits, and comes in both 32- and 64-bit flavours.
The code is highly portable, and hashes of the same length are identical on all
platforms (both big and little endian).")
    (license (list license:bsd-2        ; xxhash library (xxhash.[ch])
                   license:gpl2+))))    ; xxhsum.c

(define-public python-xxhash
  (package
    (name "python-xxhash")
    (version "3.1.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "xxhash" version))
       (sha256
        (base32
         "1hdxcscry59gh0znlm71ya23mm9rfmvz8lvvlplzxzf63pib28dc"))))
    (build-system pyproject-build-system)
    ;; Needed to embed the correct version string
    (native-inputs (list python-setuptools-scm))
    (home-page "https://github.com/ifduyue/python-xxhash")
    (synopsis "Python binding for xxHash")
    (description "This package provides Python bindings for the xxHash hash
algorithm.")
    (license license:bsd-3)))
nography.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/synergy.scm, gnu/packages/telephony.scm, gnu/packages/terminals.scm, gnu/packages/tex.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tmux.scm, gnu/packages/tor.scm, gnu/packages/toys.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/virtualization.scm, gnu/packages/vlang.scm, gnu/packages/vnc.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wireservice.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, tests/lint.scm: Remove trailing ".git" from 'git-reference' URL. Ludovic Courtès 2020-07-10gnu: qbittorrent: Update to 4.2.5....* gnu/packages/bittorrent.scm (qbittorrent): Update to 4.2.5. Tobias Geerinckx-Rice 2020-06-17gnu: Transmission: Clean up the package definition....* gnu/packages/bittorrent.scm (transmission)[license]: Correct the license field. [inputs]: Remove unused inputs inotify-tools, cyrus-sasl, and file. Leo Famulari 2020-05-28gnu: Transmission: Fix CVE-2018-10756....* gnu/packages/patches/transmission-CVE-2018-10756.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/bittorrent.scm (transmission)[source]: Use it. Leo Famulari 2020-05-25gnu: uget: Update to 2.2.0....* gnu/packages/bittorrent.scm (uget): Update to 2.2.0. Nicolas Goaziou 2020-05-25gnu: uget: Use HTTPS home page URI....* gnu/packages/bittorrent.scm (uget)[home-page]: Use HTTPS URI. Nicolas Goaziou 2020-04-08Merge branch 'master' into core-updates... Conflicts: etc/news.scm gnu/local.mk gnu/packages/check.scm gnu/packages/cross-base.scm gnu/packages/gimp.scm gnu/packages/java.scm gnu/packages/mail.scm gnu/packages/sdl.scm gnu/packages/texinfo.scm gnu/packages/tls.scm gnu/packages/version-control.scm Marius Bakke 2020-04-02gnu: transmission: Install icons to the "gui" output....* gnu/packages/bittorrent.scm (transmission)[arguments]: Move the "icons" and "pixmaps" folders to the "gui" output. Previously, if the user only install the "gui" output, the icon would be missing. Pierre Neidhardt 2020-03-27Merge branch 'master' into core-updates... Conflicts: gnu/packages/icu4c.scm gnu/packages/man.scm gnu/packages/python-xyz.scm guix/scripts/environment.scm guix/scripts/pack.scm guix/scripts/package.scm guix/scripts/pull.scm guix/store.scm Marius Bakke 2020-03-22gnu: qbittorrent: Fix icons not showing in GUI....* gnu/packages/bittorrent.scm (qbittorrent)[arguments]: Add a wrap-qt phase. Guillaume Le Vaillant 2020-03-14gnu: libtorrent-rasterbar: Build with Python 3....* gnu/packages/bittorrent.scm (libtorrent-rasterbar)[native-inputs]: Change from PYTHON-2 to PYTHON-WRAPPER. Marius Bakke 2020-02-15gnu: libtorrent-rasterbar: Update to 1.1.14....* gnu/packages/bittorrent.scm (libtorrent-rasterbar): Update to 1.1.14. Marius Bakke 2020-01-03gnu: qbittorrent: Update to 4.2.1....* gnu/packages/bittorrent.scm (qbittorrent): Update to 4.2.1. Tobias Geerinckx-Rice 2019-12-19Update email for Brett Gilio....* .mailmap: Add name and email for Brett Gilio. * gnu/local.mk, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/bittorrent.scm, gnu/packages/build-tools.scm, gnu/packages/cran.scm, gnu/packages/emacs-xyz.scm, gnu/packages/messaging.scm, gnu/packages/python-xyz.scm, gnu/packages/sml.scm, gnu/packages/terminals.scm, gnu/packages/wm.scm: Update email for Brett Gilio. Brett Gilio 2019-12-07gnu: qbittorrent: Update to 4.2.0....* gnu/packages/bittorrent.scm (qbittorrent): Update to 4.2.0. Brett Gilio