unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#45547] [PATCH] gnu: Add wyhash.
@ 2020-12-30  4:12 Ryan Prior via Guix-patches via
  2020-12-30  4:12 ` [bug#45546] [PATCH] gnu: esbuild: Update to 0.8.27 Ryan Prior via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-12-30  4:12 UTC (permalink / raw)
  To: 45547

* gnu/packages/datastructures.scm (wyhash): New variable.
---
 gnu/packages/datastructures.scm | 34 ++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/datastructures.scm b/gnu/packages/datastructures.scm
index 2911a0c550..49e363d09e 100644
--- a/gnu/packages/datastructures.scm
+++ b/gnu/packages/datastructures.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2020 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,7 +34,38 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system meson))
+  #:use-module (guix build-system meson)
+  #:use-module (guix build-system trivial))
+
+(define-public wyhash
+  (package
+    (name "wyhash")
+    (version "5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/wangyi-fudan/wyhash")
+                    (commit (string-append "wyhash_v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "03ljs5iw9zrm3bydwggjvpwrcwmsd75h3dv1j4am4hw3h22cjdjc"))))
+    (build-system trivial-build-system) ;; source-only package
+    (arguments
+     '(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((dest (string-append (assoc-ref %outputs "out") "/include")))
+           (mkdir-p dest)
+           (chdir (assoc-ref %build-inputs "source"))
+           (install-file "wyhash.h" dest))
+         #t)))
+    (home-page "https://github.com/wangyi-fudan/wyhash")
+    (synopsis "Embeddable hash function and random number generator.")
+    (description "This package provides a portable hash function and random
+number generator suitable for use in data structures.  Provided by default in
+Zig, V, and Nim programming language standard libraries.")
+    (license license:unlicense)))
 
 (define-public gdsl
   (package
-- 
2.29.2






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

end of thread, other threads:[~2020-12-30 23:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-30  4:12 [bug#45547] [PATCH] gnu: Add wyhash Ryan Prior via Guix-patches via
2020-12-30  4:12 ` [bug#45546] [PATCH] gnu: esbuild: Update to 0.8.27 Ryan Prior via Guix-patches via
2020-12-30 23:34   ` Leo Famulari
2020-12-30  4:12 ` [bug#45547] [PATCH] gnu: zrythm: Update to 1.0.0-alpha.6.0.1 Ryan Prior via Guix-patches via
2020-12-30 23:41   ` bug#45547: " Leo Famulari
2020-12-30 23:04 ` [bug#45547] [PATCH] gnu: Add wyhash Leo Famulari

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).