GNU bug report logs - #50793
[PATCH 0/2] cloudflare-cli and dependency JSON.sh

Previous Next

Package: guix-patches;

Reported by: Stephen Paul Weber <singpolyma <at> singpolyma.net>

Date: Sat, 25 Sep 2021 01:39:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 50793 <at> debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Subject: [bug#50793] [PATCH 1/2] gnu: Add JSON.sh
Date: Fri, 24 Sep 2021 20:39:33 -0500
* 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")
+    (version "0d5e5c7")
+    (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))
+         (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"))
+                    ":")))))))))
+    (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")
+    (home-page "https://github.com/dominictarr/JSON.sh")
+    (license license:asl2.0)))
+
 (define-public capnproto
   (package
     (name "capnproto")
-- 
2.20.1




This bug report was last modified 3 years and 222 days ago.

Previous Next


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