* [bug#69135] [PATCH] gnu: Add go-github-com-dustin-gojson.
@ 2024-02-14 20:59 Artyom V. Poptsov
2024-02-15 11:59 ` Sharlatan Hellseher
2024-02-20 0:03 ` bug#69135: " Sharlatan Hellseher
0 siblings, 2 replies; 4+ messages in thread
From: Artyom V. Poptsov @ 2024-02-14 20:59 UTC (permalink / raw)
To: 69135
[-- Attachment #1.1: Type: text/plain, Size: 59 bytes --]
Hello,
this patch adds "go-github-com-dustin-gojson". [1]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-go-github-com-dustin-gojson.patch --]
[-- Type: text/x-diff, Size: 2399 bytes --]
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
[-- Attachment #1.3: Type: text/plain, Size: 463 bytes --]
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/
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#69135] [PATCH] gnu: Add go-github-com-dustin-gojson.
2024-02-14 20:59 [bug#69135] [PATCH] gnu: Add go-github-com-dustin-gojson Artyom V. Poptsov
@ 2024-02-15 11:59 ` Sharlatan Hellseher
2024-02-15 20:52 ` Artyom V. Poptsov
2024-02-20 0:03 ` bug#69135: " Sharlatan Hellseher
1 sibling, 1 reply; 4+ messages in thread
From: Sharlatan Hellseher @ 2024-02-15 11:59 UTC (permalink / raw)
To: 69135; +Cc: poptsov.artyom
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 584 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#69135] [PATCH] gnu: Add go-github-com-dustin-gojson.
2024-02-15 11:59 ` Sharlatan Hellseher
@ 2024-02-15 20:52 ` Artyom V. Poptsov
0 siblings, 0 replies; 4+ messages in thread
From: Artyom V. Poptsov @ 2024-02-15 20:52 UTC (permalink / raw)
To: Sharlatan Hellseher; +Cc: 69135
[-- Attachment #1.1: Type: text/plain, Size: 82 bytes --]
Hello,
thank you for the patch review!
Here's the updated version of the patch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-go-github-com-dustin-gojson.patch --]
[-- Type: text/x-diff, Size: 2600 bytes --]
From 185d399014fb2e9b4129f717fc3c56b181de243b Mon Sep 17 00:00:00 2001
Message-ID: <185d399014fb2e9b4129f717fc3c56b181de243b.1708030303.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-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 41821af92b..4546eb59c7 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -385,6 +385,41 @@ (define-public go-github-com-djherbis-atime
atimes for files.")
(license license:expat)))
+(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.21.
+ (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)")) ;))))
+ (substitute* "scanner.go"
+ (("s := strconv.Quote\\(string\\(c\\)\\)")
+ "s := strconv.QuoteRune(rune(c))"))))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/dustin/gojson"
+ #:go ,go-1.21))
+ (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-gabriel-vasile-mimetype
(package
(name "go-github-com-gabriel-vasile-mimetype")
base-commit: 203344cc37c8a7df1ec1454381b5069d53ce7f9e
--
2.41.0
[-- Attachment #1.3: Type: text/plain, Size: 216 bytes --]
- avp
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#69135: [PATCH] gnu: Add go-github-com-dustin-gojson.
2024-02-14 20:59 [bug#69135] [PATCH] gnu: Add go-github-com-dustin-gojson Artyom V. Poptsov
2024-02-15 11:59 ` Sharlatan Hellseher
@ 2024-02-20 0:03 ` Sharlatan Hellseher
1 sibling, 0 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2024-02-20 0:03 UTC (permalink / raw)
To: 69135-done
[-- Attachment #1: Type: text/plain, Size: 77 bytes --]
Hi,
Pushed as 930692feb0d26c2d9ab5715a2a84196eef13f221 to master.
--
Oleg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-20 0:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14 20:59 [bug#69135] [PATCH] gnu: Add go-github-com-dustin-gojson Artyom V. Poptsov
2024-02-15 11:59 ` Sharlatan Hellseher
2024-02-15 20:52 ` Artyom V. Poptsov
2024-02-20 0:03 ` bug#69135: " Sharlatan Hellseher
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).