* [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
* Re: [PATCH] gnu: Add xxhash.
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
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2015-04-28 14:48 UTC (permalink / raw)
To: David Thompson; +Cc: guix-devel
On Sun, Apr 26, 2015 at 05:53:32PM -0400, David Thompson wrote:
> * gnu/packages/xxhash.scm: New file.
I am usually not in favour of adding new files for small utilities. Could it
go somewhere else?
> + (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.")
Maybe drop the marketing parts "extremely fast"?
Otherwise, it looks good to me.
Andreas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gnu: Add xxhash.
2015-04-28 14:48 ` Andreas Enge
@ 2015-04-28 15:36 ` David Thompson
2015-04-29 20:53 ` Andreas Enge
0 siblings, 1 reply; 4+ messages in thread
From: David Thompson @ 2015-04-28 15:36 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
Andreas Enge <andreas@enge.fr> writes:
> On Sun, Apr 26, 2015 at 05:53:32PM -0400, David Thompson wrote:
>> * gnu/packages/xxhash.scm: New file.
>
> I am usually not in favour of adding new files for small utilities. Could it
> go somewhere else?
I don't like it either, but there's no existing module that makes
sense. Can anyone think of one? It this tool created cryptographic
hashes then I would have put it in crypto.scm.
>
>> + (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.")
>
> Maybe drop the marketing parts "extremely fast"?
Okay.
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gnu: Add xxhash.
2015-04-28 15:36 ` David Thompson
@ 2015-04-29 20:53 ` Andreas Enge
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Enge @ 2015-04-29 20:53 UTC (permalink / raw)
To: David Thompson; +Cc: guix-devel
On Tue, Apr 28, 2015 at 11:36:29AM -0400, David Thompson wrote:
> I don't like it either, but there's no existing module that makes
> sense. Can anyone think of one? It this tool created cryptographic
> hashes then I would have put it in crypto.scm.
Like the two packages in boost.scm, it looks like something to go into
"data structures and algorithms", but this does not make for a nice module
name... "datastructures.scm" could be one, but I am not really convinced
by it either.
Andreas
^ permalink raw reply [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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.