From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ECqvAtJ3719zPQAA0tVLHw (envelope-from ) for ; Fri, 01 Jan 2021 19:28:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WG8NOtF371/VMQAAbx9fmQ (envelope-from ) for ; Fri, 01 Jan 2021 19:28:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4FDCB9404C8 for ; Fri, 1 Jan 2021 19:28:17 +0000 (UTC) Received: from localhost ([::1]:49716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvQ5w-0003Jt-94 for larch@yhetil.org; Fri, 01 Jan 2021 14:28:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvQ5i-0003Iw-Gv for guix-patches@gnu.org; Fri, 01 Jan 2021 14:28:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kvQ5i-0006m6-75 for guix-patches@gnu.org; Fri, 01 Jan 2021 14:28:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kvQ5i-00052W-3h for guix-patches@gnu.org; Fri, 01 Jan 2021 14:28:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45601] [PATCH 1/6] gnu: Add wyhash. References: <20210101192319.23494-1-rprior@protonmail.com> In-Reply-To: <20210101192319.23494-1-rprior@protonmail.com> Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Jan 2021 19:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45601 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45601@debbugs.gnu.org Received: via spool by 45601-submit@debbugs.gnu.org id=B45601.160952925919293 (code B ref 45601); Fri, 01 Jan 2021 19:28:02 +0000 Received: (at 45601) by debbugs.gnu.org; 1 Jan 2021 19:27:39 +0000 Received: from localhost ([127.0.0.1]:34900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kvQ5L-000515-1v for submit@debbugs.gnu.org; Fri, 01 Jan 2021 14:27:39 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:56196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kvQ5I-00050R-TI for 45601@debbugs.gnu.org; Fri, 01 Jan 2021 14:27:37 -0500 Date: Fri, 01 Jan 2021 19:27:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609529251; bh=JnUqPYbZkyePl8WXvw6RyeaE0Twld/xeNFZHiPZ5sm4=; h=Date:To:From:Reply-To:Subject:From; b=SU4RxoYf+C1tRQeofCwV6yZY8wI3HsAC/3BufKmfSkmVCqmh8Cnj+e1zukhES10Mo 1/zzyvLmoQUDTu/s0uVSdnAaCnCqnVbyI/+gRUsgiqe8uypYAuo/I1rzcpzFC3peAf GLu4fWIercKMUzhtKzok+hPYokQSua+KTBDLnK1M= Message-ID: <20210101192713.23655-1-rprior@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Ryan Prior , Ryan Prior via Guix-patches From: Ryan Prior via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.83 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=protonmail.com header.s=protonmail header.b=SU4RxoYf; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 4FDCB9404C8 X-Spam-Score: -2.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: m8fNOrS0n7nj * 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 =C2=A9 2019, 2020 Efraim Flashner ;;; Copyright =C2=A9 2020 Mark H Weaver ;;; Copyright =C2=A9 2020 Marius Bakke +;;; Copyright =C2=A9 2020 Ryan Prior ;;; ;;; 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 "03ljs5iw9zrm3bydwggjvpwrcwmsd75h3dv1j4am4hw3h22cjd= jc")))) + (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 rando= m +number generator suitable for use in data structures. Provided by default= in +Zig, V, and Nim programming language standard libraries.") + (license license:unlicense))) =20 (define-public gdsl (package --=20 2.29.2