Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / digest.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 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.6.5")
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 (sha256
36 (base32 "137hifc3f3cb4ib64rd6y83arc9hmbyncgrij2v8m94mx66g2aks"))))
37 (build-system gnu-build-system)
38 (arguments
39 `(#:make-flags
40 (list "CC=gcc"
41 "XXH_FORCE_MEMORY_ACCESS=1" ; improved performance with GCC
42 (string-append "prefix=" (assoc-ref %outputs "out")))
43 #:test-target "test"
44 ;; Parallel testing tries to run ‘xxhsum’ before it's been built.
45 #:parallel-tests? #f
46 #:phases
47 (modify-phases %standard-phases
48 (delete 'configure)))) ; no configure script
49 (home-page "https://cyan4973.github.io/xxHash/")
50 (synopsis "Extremely fast hash algorithm")
51 (description
52 "xxHash is an extremely fast non-cryptographic hash algorithm. It works
53 at speeds close to RAM limits, and comes in both 32- and 64-bit flavours.
54 The code is highly portable, and hashes of the same length are identical on all
55 platforms (both big and little endian).")
56 (license (list license:bsd-2 ; xxhash library (xxhash.[ch])
57 license:gpl2+)))) ; xxhsum.c