diff mbox series

[bug#69135] gnu: Add go-github-com-dustin-gojson.

Message ID 87le7mzrr5.fsf@gmail.com
State New
Headers show
Series [bug#69135] gnu: Add go-github-com-dustin-gojson. | expand

Commit Message

Artyom V. Poptsov Feb. 14, 2024, 8:59 p.m. UTC
Hello,

this patch adds "go-github-com-dustin-gojson". [1]
This is a dependency for "ejson"[2] which in turn
a dependency for the latest Chezmoi[3] version.  ;-)

Thanks,
- avp

References:
1. https://github.com/dustin/gojson/
2. https://github.com/Shopify/ejson/
3. https://github.com/twpayne/chezmoi/

Comments

Sharlatan Hellseher Feb. 15, 2024, 11:59 a.m. UTC | #1
Hi,

Thank you for the patch.

Consider to place it in golang-web or golang-xyz, alphabetical
 order is preferred.

go-1.14 is scheduled to be removed soon https://issues.guix.gnu.org/68300,
please check if it maybe
be built with higher version.

Thanks,
Oleg
Sharlatan Hellseher Feb. 20, 2024, 12:03 a.m. UTC | #2
Hi,

Pushed as 930692feb0d26c2d9ab5715a2a84196eef13f221 to master.

--
Oleg
diff mbox series

Patch

From b808163b035eff7ccc9fe2f0b068734c9a3f2898 Mon Sep 17 00:00:00 2001
Message-ID: <b808163b035eff7ccc9fe2f0b068734c9a3f2898.1707944144.git.poptsov.artyom@gmail.com>
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Wed, 14 Feb 2024 23:55:37 +0300
Subject: [PATCH] gnu: Add go-github-com-dustin-gojson.

* gnu/packages/golang.scm (go-github-com-dustin-gojson): New variable.

Change-Id: Ifc3df4e7a2cdf21bf0725a848123930d61d048e3
---
 gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 68e0c8eb24..645c8ba57a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4433,6 +4433,38 @@  (define-public go-gopkg-in-yaml-v3
 1.1 for backwards compatibility.")
     (license license:asl2.0)))
 
+(define-public go-github-com-dustin-gojson
+  (package
+    (name "go-github-com-dustin-gojson")
+    (version "v0.0.0-20160307161227-2e71ec9dd5ad")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dustin/gojson")
+             (commit (go-version->git-ref version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vrmmyn7l568l1k71mxd54iqf3d54pn86cf278i374j86jn0bdxf"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Fix the library to work with go-1.14.
+                   (substitute* "decode.go"
+                     (("trying to unmarshal unquoted value into")
+                      "trying to unmarshal unquoted value %v into"))
+                   (substitute* "decode_test.go"
+                     (("t.Fatalf\\(\"Unmarshal: %v\"\\)")
+                      "t.Fatalf(\"Unmarshal: %v\", data)"))))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/dustin/gojson"
+       #:go ,go-1.14))
+    (home-page "https://github.com/dustin/gojson")
+    (synopsis "Fork of go's encoding/json with the public scanner API")
+    (description
+     "Fork of go's encoding/json with the scanner API made public.")
+    (license license:bsd-3)))
+
 (define-public go-github-com-matrix-org-gomatrix
   (package
     (name "go-github-com-matrix-org-gomatrix")

base-commit: 6ebe912b5513bba21cf1096f865cb9a324c171a5
-- 
2.41.0