GNU bug report logs - #45601
[PATCH 0/6] vlang 0.2 update

Previous Next

Package: guix-patches;

Reported by: Ryan Prior <rprior <at> protonmail.com>

Date: Fri, 1 Jan 2021 19:24:02 UTC

Severity: normal

Tags: moreinfo, patch

Full log


View this message in rfc822 format

From: Leo Famulari <leo <at> famulari.name>
To: 45601 <at> debbugs.gnu.org
Subject: [bug#45601] [PATCH] gnu: Add wyhash.
Date: Sun, 3 Jan 2021 21:07:55 -0500
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




This bug report was last modified 1 year and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.