From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SGFILICQTmF0FQAAgWs5BA (envelope-from ) for ; Sat, 25 Sep 2021 04:59:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yLQeKICQTmGfDgAA1q6Kng (envelope-from ) for ; Sat, 25 Sep 2021 02:59:12 +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 410DCC896 for ; Sat, 25 Sep 2021 04:59:12 +0200 (CEST) Received: from localhost ([::1]:52500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTxuB-00052i-Dr for larch@yhetil.org; Fri, 24 Sep 2021 22:59:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTxu1-00051Z-V7 for guix-patches@gnu.org; Fri, 24 Sep 2021 22:59:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTxu1-0006EO-NW for guix-patches@gnu.org; Fri, 24 Sep 2021 22:59:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTxu1-0002yg-Io for guix-patches@gnu.org; Fri, 24 Sep 2021 22:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50793] [PATCH 1/2] gnu: Add JSON.sh Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Sep 2021 02:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50793 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Stephen Paul Weber Cc: 50793@debbugs.gnu.org Received: via spool by 50793-submit@debbugs.gnu.org id=B50793.163253873211416 (code B ref 50793); Sat, 25 Sep 2021 02:59:01 +0000 Received: (at 50793) by debbugs.gnu.org; 25 Sep 2021 02:58:52 +0000 Received: from localhost ([127.0.0.1]:59952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTxts-0002y4-5n for submit@debbugs.gnu.org; Fri, 24 Sep 2021 22:58:52 -0400 Received: from out1.migadu.com ([91.121.223.63]:41409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTxto-0002xp-CZ for 50793@debbugs.gnu.org; Fri, 24 Sep 2021 22:58:50 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1632538726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lbzrmqMmZOTzsXmftroFsnuD3qbKzk+BGIayl0GdVp0=; b=US3S43wsyO69ZiUUfR3V4t8HZ1x/kZC0M1HgS5+5ibFJH2BsorNc1gsy02asYnUj3DtM69 VJryNSQc9PN+XPbHXFwkjf/Nky3w110LpQDQkWFDWKEQ6r2/HjppaIWLPZjnX5EdTNGh01 HftDOBAe8UiEpaC92+QANXbX/g6Y/wQ= From: Sarah Morgensen References: <20210925013848.GA2384@singpolyma-beefy.lan> <20210925013934.2763-1-singpolyma@singpolyma.net> Date: Fri, 24 Sep 2021 19:58:44 -0700 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)") Message-ID: <86k0j5wecb.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632538752; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=lbzrmqMmZOTzsXmftroFsnuD3qbKzk+BGIayl0GdVp0=; b=HIkmCv8U5FeYeMwJkgMDbRbNlLvPB6g6IC+Ulg0HsBb+sNpgcW0DTpswkdwcoSQ+DKGd0Q 1+CwyQXz+7wXBblEHEhh0xAL+NtsAqHJfWeswbPU5L2BGLhcs6MlhAPEfesT9i337EXktV Y/Sg6H9QW79ajkV7XzBfzcwWAC06G8Ro8fj7J8JCV3ADI6bjg3qq7X4uSdRLFI9mQpxs06 IPRwCk1TiGFJGREcC1Azqn+w6exWFzB8bQzZRqtanpUopg5Xobt8s60afq5xIGhqGXtAL1 Wvt4edHzQEQer3VGekWlak+ZSKb65YMKuHwad2vCQ6UTXttDGwAy6gmfmbuVTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632538752; a=rsa-sha256; cv=none; b=a5/8bdgYgVM+giPL45QS0SSu6hJWn1uNAcO5/48IgghDiqIkGboAqrhTZKrMI0Ce1SudPT 928WkSAKVN9ko4+EJj9SrxYPBZSLfvpzJnjaGebO9hSn5ouBuOGEksXI/eU3GDVwiyyFcQ zbdB8lCq2b5tFFyo/mtrOd4LXxNTyKfry653/GftNCi8sqW0/GoPYflGUqbI1gHlxggnQ7 v0MOgQwQzQHJ2+Ndwg4TOZUDCd+vzQHWyNoAl1QDTkkpYCQCsRWO32sz/VOwdrSqZT4hYe LYcR/nwx5bGa89cMHtI1+FJqz8PosxJF9JVZATFd8sip0MDszZ9SQSGcUo8jLw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=US3S43ws; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); 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-Spam-Score: -1.29 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=US3S43ws; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); 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: 410DCC896 X-Spam-Score: -1.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: Rm2aJUTkSoYS Hi, Thanks for the patches! Just a couple quick comments: Stephen Paul Weber 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