From: Ben Woodcroft <donttrustben@gmail.com>
To: Guix-devel@gnu.org
Subject: [PATCH 2/3] gnu: Add murmur-hash.
Date: Fri, 17 Jun 2016 11:23:20 +1000 [thread overview]
Message-ID: <1466126601-30932-3-git-send-email-donttrustben@gmail.com> (raw)
In-Reply-To: <1466126601-30932-1-git-send-email-donttrustben@gmail.com>
* gnu/packages/textutils.scm (murmur-hash): New variable.
---
gnu/packages/textutils.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index ebcf4b9..ce83c4d 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -373,3 +373,42 @@ runs Word\".")
(description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
in a portable way.")
(license license:boost1.0)))
+
+(define-public murmur-hash
+ ;; There are no releases so package directly from a git commit.
+ (let ((commit "61a0530f28277f2e850bfc39600ce61d02b518de"))
+ (package
+ (name "murmur-hash")
+ (version (string-append "0-1." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aappleby/smhasher.git")
+ (commit commit)))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hasigzz5dyx8dzf1arzwahhph2p4vnsq32wlyh99nga2z4hd8si"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (delete 'check)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion "src"
+ (let ((out (string-append
+ (assoc-ref outputs "out")
+ "/include")))
+ (install-file "MurmurHash3.cpp" out)
+ (install-file "MurmurHash3.h" out)))
+ #t)))))
+ (home-page "https://github.com/aappleby/smhasher")
+ (synopsis "Non-cryptographic hash function for lookup")
+ (description
+ "MurmurHash is a non-cryptographic hash function suitable for general
+hash-based lookup. The name comes from two basic operations, multiply (MU)
+and rotate (R), used in its inner loop.")
+ (license license:public-domain))))
--
2.7.4
next prev parent reply other threads:[~2016-06-17 1:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 1:23 [PATCH] Add khmer Ben Woodcroft
2016-06-17 1:23 ` [PATCH 1/3] gnu: Add python-screed Ben Woodcroft
2016-06-17 2:07 ` Leo Famulari
2016-06-17 22:57 ` Ben Woodcroft
2016-06-17 1:23 ` Ben Woodcroft [this message]
2016-06-17 1:23 ` [PATCH 3/3] gnu: Add khmer Ben Woodcroft
2016-06-17 7:23 ` Leo Famulari
2016-06-17 23:41 ` Ben Woodcroft
2016-06-25 17:30 ` Leo Famulari
2016-06-17 8:16 ` [PATCH] " Leo Famulari
2016-06-17 9:42 ` Ben Woodcroft
2016-06-17 17:54 ` Leo Famulari
2016-06-25 17:29 ` Leo Famulari
2016-06-26 9:58 ` Ludovic Courtès
2016-06-26 11:59 ` Ben Woodcroft
2016-06-26 17:34 ` Leo Famulari
2016-06-26 22:48 ` Ben Woodcroft
2016-06-27 5:01 ` Leo Famulari
2016-06-27 5:47 ` Ben Woodcroft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466126601-30932-3-git-send-email-donttrustben@gmail.com \
--to=donttrustben@gmail.com \
--cc=Guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).