From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 03 21:08:01 2021 Received: (at submit) by debbugs.gnu.org; 4 Jan 2021 02:08:01 +0000 Received: from localhost ([127.0.0.1]:39062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwFHt-00056p-IM for submit@debbugs.gnu.org; Sun, 03 Jan 2021 21:08:01 -0500 Received: from lists.gnu.org ([209.51.188.17]:49046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwFHs-00056g-LE for submit@debbugs.gnu.org; Sun, 03 Jan 2021 21:08:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwFHr-0006jl-Cf for guix-patches@gnu.org; Sun, 03 Jan 2021 21:08:00 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwFHp-0004IR-I1 for guix-patches@gnu.org; Sun, 03 Jan 2021 21:07:59 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E17E65C00D6; Sun, 3 Jan 2021 21:07:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 03 Jan 2021 21:07:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=ht//q+DpK+kaZOxZea1U9C4m gHQ1s6y16+9Odcyd/XQ=; b=fETYBVuAxqqXVEMrB44R6scpMsKWWEHPUhYiIxOT EXJHqybelGsTVNWwvcUcxP4qh64ysOynWEygbA2pCRKz5/WoCq2dLoBNmZlUt8CV 6T3hrAGikePKeA5CPRyZoX3iEJl/GzqXKqHJ2o4qPwKjR/ntkSPq0Y0U1y6TGORf Li0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ht//q+ DpK+kaZOxZea1U9C4mgHQ1s6y16+9Odcyd/XQ=; b=GtVQliBuuB05sOOpBqcnDf 0fX5cPvkDywnUEZuUwBqsMalNFf2UfV1fYgCPIKAjhK7KjWq4lCvY3e4/cZGW6mp /EQsYlw7h8uWfMR+O8jmdb4f+YGcHe3Ntc7R3EppXvE8NMrjapFVHCEwRUhZXUmC F40EbcUWRcBXWC1eeOcljeP9p9BCZtVEL0gXriLJE2cZNNd3eJWPjtGLq0/C0bbJ iM1DeJckIV+T/f/xBYfKsUn7V5a1QAjXzR38Ay+3xOsbR5hE9i8FChszu7rVvyhb HHOfO7t+TIpA4DtSm+bF4ORxTA7rVrHJV+wK0z0tw4ojCXnZxYNpvSJexKWzRyLA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdefvddggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefnvghoucfh rghmuhhlrghrihcuoehlvghosehfrghmuhhlrghrihdrnhgrmhgvqeenucggtffrrghtth gvrhhnpedvvddugefffeeitddthfefvdeuhffgkeeikeegkeevteeghfeftefggeeuudff ieenucffohhmrghinhepghhnuhdrohhrghenucfkphepjeefrddugedurdduvdejrdduge einecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgv ohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id 990A924005B; Sun, 3 Jan 2021 21:07:56 -0500 (EST) Date: Sun, 3 Jan 2021 21:07:55 -0500 From: Leo Famulari To: Ryan Prior via Guix-patches via Subject: Re: [bug#45601] [PATCH] gnu: Add wyhash. Message-ID: References: <20210101192319.23494-1-rprior@protonmail.com> <20210101211926.29943-1-rprior@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210101211926.29943-1-rprior@protonmail.com> Received-SPF: pass client-ip=66.111.4.29; envelope-from=leo@famulari.name; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 45601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) On Fri, Jan 01, 2021 at 09:19:29PM +0000, Ryan Prior via Guix-patches via wrote: > * gnu/packages/datastructures.scm (wyhash): New variable. Thanks! Pushed as 4a829b2d55bc9b0ad5a335c8228a7d2371fa1d9a with the following changes... I corrected the commit message (changing "datastructures.scm" to "digest.scm"), tweaked the logic of the builder to be more idiomatic, and removed the period at the end of the synopsis (`guix lint` complained). > + #:builder > + (begin > + (use-modules (guix build utils)) > + (let* ((out (string-append (assoc-ref %outputs "out"))) > + (src (string-append out "/include")) > + (doc (string-append out "/share/doc/" ,name "-" ,version))) > + (mkdir-p src) > + (mkdir-p doc) > + (chdir (assoc-ref %build-inputs "source")) > + (install-file "wyhash.h" src) > + (install-file "LICENSE" doc) > + (install-file "README.md" doc)) > + #t))) Regarding the builder: 1) install-file does mkdir-p [0], so that can be omitted. 2) I think it's more clear to use "include" rather than "src" when binding the output's include directory 3) Using with-directory-excursion instead of chdir is more in tune with a functional coding style [1], in my opinion [0] https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/utils.scm?h=version-1.2.0#n310 [1] https://guix.gnu.org/manual/en/html_node/Programming-Paradigm.html