gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
[jackhill/guix/guix.git] / gnu / packages / digest.scm
CommitLineData
cc17345d 1;;; GNU Guix --- Functional package management for GNU
9c1324a4 2;;; Copyright © 2017, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
cc17345d
TGR
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)
1bf1bda9 22 #:use-module (guix git-download)
9c1324a4 23 #:use-module (guix build-system gnu)
1d25cfba
TGR
24 #:use-module (guix utils)
25 #:use-module (ice-9 match))
cc17345d
TGR
26
27(define-public xxhash
28 (package
29 (name "xxhash")
08447d3a 30 (version "0.8.0")
cc17345d
TGR
31 (source
32 (origin
1bf1bda9
TGR
33 (method git-fetch)
34 (uri (git-reference
35 (url "https://github.com/Cyan4973/xxHash")
36 (commit (string-append "v" version))))
f1d4d79f 37 (file-name (git-file-name name version))
cc17345d 38 (sha256
08447d3a 39 (base32 "0hpbzdd6kfki5f61g103vp7pfczqkdj0js63avl0ss552jfb8h96"))))
cc17345d
TGR
40 (build-system gnu-build-system)
41 (arguments
42 `(#:make-flags
9c1324a4 43 (list ,(string-append "CC=" (cc-for-target))
1d25cfba
TGR
44 ,(match (or (%current-target-system)
45 (%current-system))
46 ;; Detect vector instruction set at run time.
47 ((or "i686-linux" "x86_64-linux") "DISPATCH=1")
48 (_ "DISPATCH=0"))
cc17345d
TGR
49 "XXH_FORCE_MEMORY_ACCESS=1" ; improved performance with GCC
50 (string-append "prefix=" (assoc-ref %outputs "out")))
cc17345d
TGR
51 #:phases
52 (modify-phases %standard-phases
53 (delete 'configure)))) ; no configure script
54 (home-page "https://cyan4973.github.io/xxHash/")
55 (synopsis "Extremely fast hash algorithm")
56 (description
57 "xxHash is an extremely fast non-cryptographic hash algorithm. It works
58at speeds close to RAM limits, and comes in both 32- and 64-bit flavours.
59The code is highly portable, and hashes of the same length are identical on all
60platforms (both big and little endian).")
61 (license (list license:bsd-2 ; xxhash library (xxhash.[ch])
62 license:gpl2+)))) ; xxhsum.c