unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase.
@ 2024-03-23 12:47 Artyom V. Poptsov
  2024-03-23 12:53 ` [bug#69964] [PATCH 1/4] gnu: Add go-github-com-multiformats-go-base32 Artyom V. Poptsov
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Artyom V. Poptsov @ 2024-03-23 12:47 UTC (permalink / raw)
  To: 69964; +Cc: Artyom V. Poptsov

This patch series adds "go-multibase" package along with its dependencies.
The package is required for the newer Kubo (IPFS) versions.

Artyom V. Poptsov (4):
  gnu: Add go-github-com-multiformats-go-base32.
  gnu: Add go-github-com-multiformats-go-base36.
  gnu: Add go-github-com-multiformats-multibase.
  gnu: Add go-github-com-multiformats-go-multibase.

 gnu/packages/golang-xyz.scm | 110 ++++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)


base-commit: f6f4c71df5558b168fe7a313522af7ea5fe2d0dc
-- 
2.41.0





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#69964] [PATCH 1/4] gnu: Add go-github-com-multiformats-go-base32.
  2024-03-23 12:47 [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
@ 2024-03-23 12:53 ` Artyom V. Poptsov
  2024-03-23 12:53 ` [bug#69964] [PATCH 2/4] gnu: Add go-github-com-multiformats-go-base36 Artyom V. Poptsov
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Artyom V. Poptsov @ 2024-03-23 12:53 UTC (permalink / raw)
  To: 69964; +Cc: Artyom V. Poptsov

* gnu/packages/golang-xyz.scm (go-github-com-multiformats-go-base32): New
  variable.

Change-Id: If6c54a3c2d0a62e61e524da85c76ad6bf7f7bcbe
---
 gnu/packages/golang-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index cf0b52a043..5674004424 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -40,6 +40,7 @@
 (define-module (gnu packages golang-xyz)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system go)
+  #:use-module (guix build-system copy)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -1366,6 +1367,29 @@ (define-public go-github-com-mreiferson-go-svc
 @url{https://github.com/judwhite/go-svc/raw/master/svc/svc_windows_test.go,here}.")
       (license license:expat))))
 
+(define-public go-github-com-multiformats-go-base32
+  (package
+    (name "go-github-com-multiformats-go-base32")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/multiformats/go-base32")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0ala6gaa5r5mqcg6cdwfg492hpz41cjbfwyn1ljd6qvya3n0qqiv"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/multiformats/go-base32"))
+    (home-page "https://github.com/multiformats/go-base32")
+    (synopsis "Go @code{base32} encoding package with @code{NoPadding} option")
+    (description
+     "@code{base32} encoding package from Go with @code{NoPadding} option")
+    (license license:bsd-3)))
+
 (define-public go-github-com-multiformats-go-varint
   (package
     (name "go-github-com-multiformats-go-varint")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#69964] [PATCH 2/4] gnu: Add go-github-com-multiformats-go-base36.
  2024-03-23 12:47 [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
  2024-03-23 12:53 ` [bug#69964] [PATCH 1/4] gnu: Add go-github-com-multiformats-go-base32 Artyom V. Poptsov
@ 2024-03-23 12:53 ` Artyom V. Poptsov
  2024-03-23 12:53 ` [bug#69964] [PATCH 3/4] gnu: Add go-github-com-multiformats-multibase Artyom V. Poptsov
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Artyom V. Poptsov @ 2024-03-23 12:53 UTC (permalink / raw)
  To: 69964; +Cc: Artyom V. Poptsov

* gnu/packages/golang-xyz.scm (go-github-com-multiformats-go-base36): New
  variable.

Change-Id: I27c5540fddae55ae9ce12a205d6f7f7c9a01569b
---
 gnu/packages/golang-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 5674004424..c5851cfa5f 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -1390,6 +1390,29 @@ (define-public go-github-com-multiformats-go-base32
      "@code{base32} encoding package from Go with @code{NoPadding} option")
     (license license:bsd-3)))
 
+(define-public go-github-com-multiformats-go-base36
+  (package
+    (name "go-github-com-multiformats-go-base36")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/multiformats/go-base36")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1wfhsmxkvm97pglfwgiw3ad5g9vqc9nhd61i0kyvsb9lc006g8qq"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/multiformats/go-base36"))
+    (home-page "https://github.com/multiformats/go-base36")
+    (synopsis "Optimized @code{base36} codec for Go")
+    (description
+     "Optimized codec for @code{[]byte} <=> @code{base36} string conversion.")
+    (license (list license:asl2.0 license:expat))))
+
 (define-public go-github-com-multiformats-go-varint
   (package
     (name "go-github-com-multiformats-go-varint")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#69964] [PATCH 3/4] gnu: Add go-github-com-multiformats-multibase.
  2024-03-23 12:47 [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
  2024-03-23 12:53 ` [bug#69964] [PATCH 1/4] gnu: Add go-github-com-multiformats-go-base32 Artyom V. Poptsov
  2024-03-23 12:53 ` [bug#69964] [PATCH 2/4] gnu: Add go-github-com-multiformats-go-base36 Artyom V. Poptsov
@ 2024-03-23 12:53 ` Artyom V. Poptsov
  2024-03-23 12:53 ` [bug#69964] [PATCH 4/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Artyom V. Poptsov @ 2024-03-23 12:53 UTC (permalink / raw)
  To: 69964; +Cc: Artyom V. Poptsov

* gnu/packages/golang-xyz.scm (go-github-com-multiformats-multibase): New
  variable.

Change-Id: I5994e8f8927d5365cc201da30bd49abf03d17574
---
 gnu/packages/golang-xyz.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index c5851cfa5f..d7fd50ae3d 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -1413,6 +1413,33 @@ (define-public go-github-com-multiformats-go-base36
      "Optimized codec for @code{[]byte} <=> @code{base36} string conversion.")
     (license (list license:asl2.0 license:expat))))
 
+(define-public go-github-com-multiformats-multibase
+  (let ((commit "4c8344e37852773de155f587dcf5897771b3fc19")
+        (revision "1"))
+    (package
+      (name "go-github-com-multiformats-multibase")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/multiformats/multibase")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0lz4kdysa6nx7wf1i59647w7dgm344xpvfnsac3pfk2qdky2kq8b"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:install-plan
+         '(("." "share/multibase/"))))
+      (home-page "https://github.com/multiformats/multibase")
+      (synopsis "Self identifying base encodings")
+      (description
+       "Multibase is a protocol for disambiguating the encoding of
+base-encoded (e.g., @code{base32}, @code{base36}, @code{base64}, @code{base58}, etc.)
+binary appearing in text.")
+      (license (list license:expat license:cc-by-sa3.0)))))
+
 (define-public go-github-com-multiformats-go-varint
   (package
     (name "go-github-com-multiformats-go-varint")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#69964] [PATCH 4/4] gnu: Add go-github-com-multiformats-go-multibase.
  2024-03-23 12:47 [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
                   ` (2 preceding siblings ...)
  2024-03-23 12:53 ` [bug#69964] [PATCH 3/4] gnu: Add go-github-com-multiformats-multibase Artyom V. Poptsov
@ 2024-03-23 12:53 ` Artyom V. Poptsov
  2024-03-23 20:14 ` [bug#69964] [PATCH 0/4] " Sharlatan Hellseher
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Artyom V. Poptsov @ 2024-03-23 12:53 UTC (permalink / raw)
  To: 69964; +Cc: Artyom V. Poptsov

* gnu/packages/golang-xyz.scm (go-github-com-multiformats-go-multibase): New
  variable.

Change-Id: If634f1497d628a23f2c2ebb1e8e9f6526faa3f3f
---
 gnu/packages/golang-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index d7fd50ae3d..468359e2ef 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -1440,6 +1440,42 @@ (define-public go-github-com-multiformats-multibase
 binary appearing in text.")
       (license (list license:expat license:cc-by-sa3.0)))))
 
+(define-public go-github-com-multiformats-go-multibase
+  (package
+    (name "go-github-com-multiformats-go-multibase")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/multiformats/go-multibase")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "11za5yqiq9bkxfg0lvjzgr5d0kawkf2szxj90by9vfnalihqgkrr"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:go go-1.21
+      #:import-path "github.com/multiformats/go-multibase"
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'copy-multibase-specs
+                     (lambda _
+                       (copy-recursively (string-append #$(this-package-native-input
+                                                           "go-github-com-multiformats-multibase")
+                                                        "/share/multibase/")
+                        "src/github.com/multiformats/go-multibase/spec"))))))
+    (native-inputs (list go-github-com-multiformats-multibase))
+    (inputs (list go-github-com-mr-tron-base58
+                  go-github-com-multiformats-go-base32
+                  go-github-com-multiformats-go-base36))
+    (home-page "https://github.com/multiformats/go-multibase")
+    (synopsis "Implementation of multibase parser in Go")
+    (description
+     "Implementation of @url{https://github.com/multiformats/multibase,
+multibase} (self identifying base encodings) in Go.")
+    (license license:expat)))
+
 (define-public go-github-com-multiformats-go-varint
   (package
     (name "go-github-com-multiformats-go-varint")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase.
  2024-03-23 12:47 [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
                   ` (3 preceding siblings ...)
  2024-03-23 12:53 ` [bug#69964] [PATCH 4/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
@ 2024-03-23 20:14 ` Sharlatan Hellseher
  2024-03-24 13:03   ` Artyom V. Poptsov
  2024-03-24 21:04 ` Sharlatan Hellseher
  2024-04-06 22:40 ` bug#69964: " Sharlatan Hellseher
  6 siblings, 1 reply; 9+ messages in thread
From: Sharlatan Hellseher @ 2024-03-23 20:14 UTC (permalink / raw)
  To: 69964; +Cc: Artyom V. Poptsov

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

Hi,

Thank you for the patches.

I started the review process.

Did you check a better place in gnu/packages for this one
https://github.com/multiformats/multibase?tab=readme-ov-file#implementations

It looks like a map of formats and the implementations may be not just in
golang.

Check encoding module and consider to name it lees package specific.

Thanks,
Oleg

[-- Attachment #2: Type: text/html, Size: 778 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase.
  2024-03-23 20:14 ` [bug#69964] [PATCH 0/4] " Sharlatan Hellseher
@ 2024-03-24 13:03   ` Artyom V. Poptsov
  0 siblings, 0 replies; 9+ messages in thread
From: Artyom V. Poptsov @ 2024-03-24 13:03 UTC (permalink / raw)
  To: Sharlatan Hellseher; +Cc: 69964

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

Hello Oleg!

> I started the review process.

Great, thanks!

> Did you check a better place in gnu/packages for this one
> https://github.com/multiformats/multibase?tab=readme-ov-file#implementations
>
> It looks like a map of formats and the implementations may be not just in golang.

Yes, I saw this.  I just wasn't sure what module to use for the
"multibase" package.

> Check encoding module and consider to name it lees package specific.

Should I create "encodings.scm"?  Or maybe "specs.scm" is a better name
for it?  Because if there will be need for other protocol/format
specifications we can place the packages to "specs.scm".

Also what is the proper way to update the patch series?

Thanks!

- 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	[flat|nested] 9+ messages in thread

* [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase.
  2024-03-23 12:47 [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
                   ` (4 preceding siblings ...)
  2024-03-23 20:14 ` [bug#69964] [PATCH 0/4] " Sharlatan Hellseher
@ 2024-03-24 21:04 ` Sharlatan Hellseher
  2024-04-06 22:40 ` bug#69964: " Sharlatan Hellseher
  6 siblings, 0 replies; 9+ messages in thread
From: Sharlatan Hellseher @ 2024-03-24 21:04 UTC (permalink / raw)
  To: 69964; +Cc: Artyom avp Poptsov

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]


Hi,

I've checked https://github.com/multiformats, and it looks like a very
nice project which is in use by others large ones:

- IPFS https://ipfs.tech/
- CIDs https://github.com/multiformats/cid
- libp2p https://github.com/libp2p/libp2p
- IPLD https://github.com/ipld/ipld

> Should I create "encodings.scm"?  Or maybe "specs.scm" is a better name
> for it?  Because if there will be need for other protocol/format
> specifications we can place the packages to "specs.scm".

I'm not quite sure what to answer here, after a brief check of any
relevant modules. I've only found that there are only language specific
*-base* packages.

I'll give it another round to find some appropriate place for
specification distributed as CSV file from
<https://github.com/multiformats/multibase>, or we may ping someone else
from core/mentor team.

Based on the project's check, they provide verity language
implementations e.g. in Rust, Python, Go, Java, JavaScript so having
spec file in golang-*.scm is not the best place.

> Also what is the proper way to update the patch series?

I can't suggest any tooling, just describe my common flow.

I usually create patches on my local Guix checkout branch e.g.
'local/astro-update' and I use Emacs's Magit. If I need new patch series
I pull all, rebase on master select amended/update commits and place
new version prefix.

In short, use the same commit headers but add prefix 'PATCH v2' which
will be identified nicely by QA and the patch series may be obtained
much easily.

--
Oleg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#69964: [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase.
  2024-03-23 12:47 [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
                   ` (5 preceding siblings ...)
  2024-03-24 21:04 ` Sharlatan Hellseher
@ 2024-04-06 22:40 ` Sharlatan Hellseher
  6 siblings, 0 replies; 9+ messages in thread
From: Sharlatan Hellseher @ 2024-04-06 22:40 UTC (permalink / raw)
  To: 69964-done

[-- Attachment #1: Type: text/plain, Size: 81 bytes --]


Closing this as resolved based on <https://issues.guix.gnu.org/70234>.

--
Oleg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-06 22:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-23 12:47 [bug#69964] [PATCH 0/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
2024-03-23 12:53 ` [bug#69964] [PATCH 1/4] gnu: Add go-github-com-multiformats-go-base32 Artyom V. Poptsov
2024-03-23 12:53 ` [bug#69964] [PATCH 2/4] gnu: Add go-github-com-multiformats-go-base36 Artyom V. Poptsov
2024-03-23 12:53 ` [bug#69964] [PATCH 3/4] gnu: Add go-github-com-multiformats-multibase Artyom V. Poptsov
2024-03-23 12:53 ` [bug#69964] [PATCH 4/4] gnu: Add go-github-com-multiformats-go-multibase Artyom V. Poptsov
2024-03-23 20:14 ` [bug#69964] [PATCH 0/4] " Sharlatan Hellseher
2024-03-24 13:03   ` Artyom V. Poptsov
2024-03-24 21:04 ` Sharlatan Hellseher
2024-04-06 22:40 ` bug#69964: " 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).