unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add xxhash.
@ 2015-04-26 21:53 David Thompson
  2015-04-28 14:48 ` Andreas Enge
  0 siblings, 1 reply; 4+ messages in thread
From: David Thompson @ 2015-04-26 21:53 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: 0001-gnu-Add-xxhash.patch --]
[-- Type: text/x-diff, Size: 3870 bytes --]

From 43b55a20d7d4c01b200768ccea733d261c12e699 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Sun, 26 Apr 2015 16:42:05 -0400
Subject: [PATCH] gnu: Add xxhash.

* gnu/packages/xxhash.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am           |  1 +
 gnu/packages/xxhash.scm | 63 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 gnu/packages/xxhash.scm

diff --git a/gnu-system.am b/gnu-system.am
index ae6b4e2..a99e2bd 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -317,6 +317,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/xdisorg.scm			\
   gnu/packages/xorg.scm				\
   gnu/packages/xfce.scm				\
+  gnu/packages/xxhash.scm			\
   gnu/packages/yasm.scm				\
   gnu/packages/yubico.scm			\
   gnu/packages/zile.scm				\
diff --git a/gnu/packages/xxhash.scm b/gnu/packages/xxhash.scm
new file mode 100644
index 0000000..28241db
--- /dev/null
+++ b/gnu/packages/xxhash.scm
@@ -0,0 +1,63 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 David Thompson <davet@gnu.org>
+;;;
+;;; 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 xxhash)
+  #:use-module (gnu packages)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages valgrind))
+
+(define-public xxhash
+  (package
+    (name "xxhash")
+    (version "r39")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/Cyan4973/xxHash/archive/"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "06mw48qyb58w6rclfsplbmakczdy9rnb72dwqj5an4bfsax2vai3"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:make-flags '("CC=gcc")
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  ;; There is no 'install' phase in the Makefile.
+                  (replace 'install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (bindir (string-append out "/bin"))
+                             (xxhsum (string-append bindir "/xxhsum")))
+                        (mkdir-p bindir)
+                        (copy-file "xxhsum" xxhsum)
+                        (symlink xxhsum (string-append bindir "/xxh32sum"))
+                        (symlink xxhsum (string-append bindir "/xxh64sum"))
+                        #t))))))
+    (native-inputs
+     `(("valgrind" ,valgrind)))
+    (home-page "https://github.com/Cyan4973/xxHash")
+    (synopsis "Extremely fast non-cryptographic hash algorithm")
+    (description
+     "xxHash is an extremely fast hash algorithm, running at RAM speed limits.
+It successfully passes the SMHasher test suite evaluating hash quality.")
+    (license bsd-2)))
-- 
2.1.4


[-- Attachment #2: Type: text/plain, Size: 136 bytes --]


-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-29 20:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-26 21:53 [PATCH] gnu: Add xxhash David Thompson
2015-04-28 14:48 ` Andreas Enge
2015-04-28 15:36   ` David Thompson
2015-04-29 20:53     ` Andreas Enge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).