Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / digest.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages digest)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix git-download)
23 #:use-module (guix build-system gnu))
24
25 (define-public xxhash
26 (package
27 (name "xxhash")
28 (version "0.7.2")
29 (source
30 (origin
31 (method git-fetch)
32 (uri (git-reference
33 (url "https://github.com/Cyan4973/xxHash")
34 (commit (string-append "v" version))))
35 (file-name (git-file-name name version))
36 (sha256
37 (base32 "1f9gl0cymmi92ihsfan0p4zmyf2hxwx4arjimpbmbp719nbcvdsx"))))
38 (build-system gnu-build-system)
39 (arguments
40 `(#:make-flags
41 (list "CC=gcc"
42 "XXH_FORCE_MEMORY_ACCESS=1" ; improved performance with GCC
43 (string-append "prefix=" (assoc-ref %outputs "out")))
44 #:phases
45 (modify-phases %standard-phases
46 (delete 'configure)))) ; no configure script
47 (home-page "https://cyan4973.github.io/xxHash/")
48 (synopsis "Extremely fast hash algorithm")
49 (description
50 "xxHash is an extremely fast non-cryptographic hash algorithm. It works
51 at speeds close to RAM limits, and comes in both 32- and 64-bit flavours.
52 The code is highly portable, and hashes of the same length are identical on all
53 platforms (both big and little endian).")
54 (license (list license:bsd-2 ; xxhash library (xxhash.[ch])
55 license:gpl2+)))) ; xxhsum.c