From: Sarah Morgensen <iskarian@mgsn.dev>
To: Stephen Paul Weber <singpolyma@singpolyma.net>
Cc: 50793@debbugs.gnu.org
Subject: [bug#50793] [PATCH 1/2] gnu: Add JSON.sh
Date: Fri, 24 Sep 2021 19:58:44 -0700 [thread overview]
Message-ID: <86k0j5wecb.fsf@mgsn.dev> (raw)
In-Reply-To: <20210925013934.2763-1-singpolyma@singpolyma.net> (Stephen Paul Weber's message of "Fri, 24 Sep 2021 20:39:33 -0500 (49 minutes, 6 seconds ago)")
Hi,
Thanks for the patches! Just a couple quick comments:
Stephen Paul Weber <singpolyma@singpolyma.net> writes:
> * gnu/packages/serialization.scm (JSON.sh): New variable.
> ---
> gnu/packages/serialization.scm | 45 ++++++++++++++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
> index 196141ace8..f5677d9e5f 100644
> --- a/gnu/packages/serialization.scm
> +++ b/gnu/packages/serialization.scm
> @@ -34,10 +34,13 @@
> #:use-module (guix git-download)
> #:use-module (guix utils)
> #:use-module (guix build-system cmake)
> + #:use-module (guix build-system copy)
> #:use-module (guix build-system gnu)
> #:use-module (guix build-system python)
> #:use-module (gnu packages)
> #:use-module (gnu packages autotools)
> + #:use-module (gnu packages base)
> + #:use-module (gnu packages bash)
> #:use-module (gnu packages boost)
> #:use-module (gnu packages check)
> #:use-module (gnu packages compression)
> @@ -458,6 +461,48 @@ it a convenient format to store user input files.")
> (base32
> "1180ln8blrb0mwzpcf78k49hlki6di65q77rsvglf83kfcyh4d7z"))))))
>
> +(define-public JSON.sh
> + (package
> + (name "JSON.sh")
I can't find a rule for this per se, but it's convention that package
names to be lowercase (and for the variable name to match).
> + (version "0d5e5c7")
Since this isn't a tagged version, this should follow the 'git-version'
pattern (search for usages of 'git-version' for examples).
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/dominictarr/JSON.sh")
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "14lxvp5xbdk0dcwkjbdp098z1108j8z48zaibndh4i731kkcz43i"))))
> + (build-system copy-build-system)
> + (arguments
> + `(#:install-plan '(("JSON.sh" "bin/"))
> + #:phases
> + (modify-phases %standard-phases
> + (add-before 'install 'check
> + (lambda _
> + (invoke "./all-tests.sh")
> + #t))
Check phases should respect #:tests?, like so:
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
[...]))
Also, it doesn't hurt, but phases no longer have to end in #t. :)
> + (add-after 'install 'wrap-program
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (wrap-program (string-append (assoc-ref outputs "out") "/bin/JSON.sh")
> + `("PATH" ":" prefix
> + (,(string-join
> + (map (lambda (in) (string-append (assoc-ref inputs in) "/bin"))
> + '("grep" "coreutils"))
Does this script actually use coreutils? On the other hand, it looks
like it does use gawk and sed.
> + ":")))))))))
> + (inputs
> + `(("bash-minimal" ,bash-minimal)
> + ("grep" ,grep)
> + ("coreutils" ,coreutils)))
> + (synopsis
> + "Pipeable JSON parser written in shell")
> + (description
> + "JSON parser written in shell, compatible with ash, bash, dash and zsh")
This is a bit nit-picky since it's just a dependency, but descriptions
should use full sentences, and be a bit more descriptive than this (see
"Synopses and Descriptions" in the Guix manual).
> + (home-page "https://github.com/dominictarr/JSON.sh")
> + (license license:asl2.0)))
This is actually dual-licensed with expat, so:
(license (list license:expat license:asl2.0))
Could you please send an updated patch?
--
Sarah
next prev parent reply other threads:[~2021-09-25 2:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-25 1:38 [bug#50793] [PATCH 0/2] cloudflare-cli and dependency JSON.sh Stephen Paul Weber
2021-09-25 1:39 ` [bug#50793] [PATCH 1/2] gnu: Add JSON.sh Stephen Paul Weber
2021-09-25 1:39 ` [bug#50793] [PATCH 2/2] gnu: Add cloudflare-cli Stephen Paul Weber
2021-09-25 2:58 ` Sarah Morgensen
2021-09-26 1:21 ` Stephen Paul Weber
2021-09-25 2:58 ` Sarah Morgensen [this message]
2021-09-26 1:08 ` [bug#50793] [PATCH 1/2] gnu: Add JSON.sh Stephen Paul Weber
2021-09-26 3:02 ` Sarah Morgensen
2021-09-26 23:32 ` Stephen Paul Weber
2021-09-26 1:29 ` [bug#50793] [PATCH v2 " Stephen Paul Weber
2021-09-26 1:29 ` [bug#50793] [PATCH v2 2/2] gnu: Add cloudflare-cli Stephen Paul Weber
2021-09-26 23:35 ` [bug#50793] [PATCH v3 1/2] gnu: Add JSON.sh Stephen Paul Weber
2021-09-26 23:35 ` [bug#50793] [PATCH v3 2/2] gnu: Add cloudflare-cli Stephen Paul Weber
2021-10-13 9:08 ` bug#50793: [PATCH 0/2] cloudflare-cli and dependency JSON.sh Ludovic Courtès
2021-10-13 9:05 ` [bug#50793] " Ludovic Courtès
2021-10-13 19:03 ` Maxim Cournoyer
2021-10-14 8:54 ` zimoun
2021-10-15 3:26 ` Maxim Cournoyer
2021-10-15 15:28 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86k0j5wecb.fsf@mgsn.dev \
--to=iskarian@mgsn.dev \
--cc=50793@debbugs.gnu.org \
--cc=singpolyma@singpolyma.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.