[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45601] [PATCH] gnu: Add wyhash.
From: |
Leo Famulari |
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
- [bug#45601] [PATCH 0/6] vlang 0.2 update, Ryan Prior, 2021/01/01
- [bug#45601] [PATCH 1/6] gnu: Add wyhash., Ryan Prior, 2021/01/01
- [bug#45601] [PATCH 3/6] gnu: vlang: Use system tiny-bignum., Ryan Prior, 2021/01/01
- [bug#45601] [PATCH 2/6] gnu: vlang: Update to 0.2., Ryan Prior, 2021/01/01
- [bug#45601] [PATCH 4/6] gnu: vlang: Use system cJSON., Ryan Prior, 2021/01/01
- [bug#45601] [PATCH 5/6] gnu: vlang: Use system wyhash., Ryan Prior, 2021/01/01
- [bug#45601] [PATCH 6/6] gnu: vlang: Fix v tools., Ryan Prior, 2021/01/01
- [bug#45601] [PATCH 1/6] gnu: Add wyhash., Leo Famulari, 2021/01/01
- [bug#45601] [PATCH] gnu: Add wyhash., Ryan Prior, 2021/01/01
- [bug#45601] [PATCH] gnu: Add wyhash.,
Leo Famulari <=
- [bug#45601] [PATCH] gnu: vlang: Update to 0.2., Ryan Prior, 2021/01/02
- [bug#45601] [PATCH 0/2] Another vlang dependency plucked out (re: bug#45601), Ryan Prior, 2021/01/03
- [bug#45601] [PATCH] gnu: Add wyhash., Ryan Prior, 2021/01/03
- [bug#45601] [PATCH 0/1] Updated picoev patch based on feedback, Ryan Prior, 2021/01/03