[PATCH 0/4] gnu: Add go-github-com-ipfs-go-cid.

  • Done
  • quality assurance status badge
Details
2 participants
  • Artyom V. Poptsov
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal
A
A
Artyom V. Poptsov wrote on 7 Apr 11:59 +0200
(address . guix-patches@gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
cover.1712483893.git.poptsov.artyom@gmail.com
This patch series adds "go-github-com-ipfs-go-cid" package that is required
for the newer versions of Kubo (IPFS.)

Artyom V. Poptsov (4):
gnu: Add specification-multihash.
gnu: Add specification-multicodec.
gnu: Add go-github-com-multiformats-go-multihash-0.2.3.
gnu: Add go-github-com-ipfs-go-cid.

gnu/packages/golang-crypto.scm | 48 +++++++++++++++++++++++++++-
gnu/packages/ipfs.scm | 36 +++++++++++++++++++++
gnu/packages/specifications.scm | 56 +++++++++++++++++++++++++++++++++
3 files changed, 139 insertions(+), 1 deletion(-)


base-commit: eaccfececd0eec362b247efd47861e2118dd9dd8
--
2.41.0
A
A
Artyom V. Poptsov wrote on 7 Apr 12:01 +0200
[PATCH 1/4] gnu: Add specification-multihash.
(address . 70255@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
af17da0e2a8fccd48fa6c29c6f122c796fefe719.1712483893.git.poptsov.artyom@gmail.com
* gnu/packages/specifications.scm (specification-multihash): New variable.

Change-Id: I065898164cc126445a92b33dd628ab06e19d0615
---
gnu/packages/specifications.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/specifications.scm b/gnu/packages/specifications.scm
index ce57a68bdb..b44f0eaaee 100644
--- a/gnu/packages/specifications.scm
+++ b/gnu/packages/specifications.scm
@@ -51,3 +51,31 @@ (define-public specification-multibase
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 specification-multihash
+ (let ((commit "931febb97565395b1b6cd39ac677799df265a9e7")
+ (revision "0"))
+ (package
+ (name "specification-multihash")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/multiformats/multihash")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1axr35z3iz061fng0170bh873vy20rj2mspznycxm1qkrkrh7p5j"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("." "share/multihash/"))
+ #:phases (modify-phases %standard-phases
+ (delete 'strip))))
+ (home-page "https://github.com/multiformats/multihash")
+ (synopsis "Self-describing hashes")
+ (description
+ "Multihash is a protocol for differentiating outputs from various
+well-established cryptographic hash functions, addressing size + encoding
+considerations.")
+ (license (list license:expat license:cc-by-sa3.0)))))
--
2.41.0
A
A
Artyom V. Poptsov wrote on 7 Apr 12:01 +0200
[PATCH 2/4] gnu: Add specification-multicodec.
(address . 70255@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
f623f2aa7112cc01996f8364651b2b97777afd9f.1712483893.git.poptsov.artyom@gmail.com
* gnu/packages/specifications.scm (specification-multicodec): New variable.

Change-Id: I75de43613c5a1818b1db79aa275c58dc52411957
---
gnu/packages/specifications.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/specifications.scm b/gnu/packages/specifications.scm
index b44f0eaaee..125d794932 100644
--- a/gnu/packages/specifications.scm
+++ b/gnu/packages/specifications.scm
@@ -52,6 +52,34 @@ (define-public specification-multibase
binary appearing in text.")
(license (list license:expat license:cc-by-sa3.0)))))
+(define-public specification-multicodec
+ (let ((commit "36789e0856be22fa02f4dc55582ec670b2b4318b")
+ (revision "0"))
+ (package
+ (name "specification-multicodec")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/multiformats/multicodec")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0dyawicg8q4f8g6xj5bsj5l3c8rb8mrafjkrabc6a3p65845wp2r"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("." "share/multicodec/"))
+ #:phases (modify-phases %standard-phases
+ (delete 'strip))))
+ (home-page "https://github.com/multiformats/multicodec")
+ (synopsis "Compact self-describing codecs")
+ (description
+ "Multicodec is an agreed-upon codec table. It is designed for use in binary
+representations, such as keys or identifiers (i.e @url{https://github.com/ipld/cid,
+CID}).")
+ (license (list license:expat license:cc-by-sa3.0)))))
+
(define-public specification-multihash
(let ((commit "931febb97565395b1b6cd39ac677799df265a9e7")
(revision "0"))
--
2.41.0
A
A
Artyom V. Poptsov wrote on 7 Apr 12:01 +0200
[PATCH 3/4] gnu: Add go-github-com-multiformats-go-multihash-0.2.3.
(address . 70255@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
c700dfe7fc8d5caf97fab03bbc4cd31953f89abf.1712483893.git.poptsov.artyom@gmail.com
* gnu/packages/golang-crypto.scm:
(go-github-com-multiformats-go-multihash-0.2.3): New variable.

Change-Id: I6ac1d5a5f96d01fa40c588e720c4b1c3b99a91a7
---
gnu/packages/golang-crypto.scm | 48 +++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)

Toggle diff (68 lines)
diff --git a/gnu/packages/golang-crypto.scm b/gnu/packages/golang-crypto.scm
index 3b95965f6b..d741a48667 100644
--- a/gnu/packages/golang-crypto.scm
+++ b/gnu/packages/golang-crypto.scm
@@ -48,7 +48,9 @@ (define-module (gnu packages golang-crypto)
#:use-module (gnu packages golang-build)
#:use-module (gnu packages golang-check)
#:use-module (gnu packages golang-compression)
- #:use-module (gnu packages golang-web))
+ #:use-module (gnu packages golang-web)
+ #:use-module (gnu packages golang-xyz)
+ #:use-module (gnu packages specifications))
;;; Commentary:
;;;
@@ -818,6 +820,50 @@ (define-public go-github-com-multiformats-go-multihash
(description "Multihash implementation in Go.")
(license license:expat))))
+(define-public go-github-com-multiformats-go-multihash-0.2.3
+ (package
+ (inherit go-github-com-multiformats-go-multihash)
+ (name "go-github-com-multiformats-go-multihash")
+ (version "0.2.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/multiformats/go-multihash")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ydh94083888xl2r4d1grzgqf3c818mkmdpj008jkh6h7m56wc4w"))))
+ (arguments
+ (list #:go go-1.21
+ #:import-path "github.com/multiformats/go-multihash"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'copy-multibase-specs
+ (lambda* (#:key import-path #:allow-other-keys)
+ (copy-recursively
+ (string-append #$(this-package-native-input
+ "specification-multihash")
+ "/share/multihash/")
+ (string-append "src/" import-path "/spec/multihash/"))
+ (copy-recursively
+ (string-append #$(this-package-native-input
+ "specification-multicodec")
+ "/share/multicodec/")
+ (string-append "src/" import-path "/spec/multicodec/")))))))
+ (native-inputs
+ (list specification-multihash
+ specification-multicodec))
+ (propagated-inputs
+ (list go-github-com-gxed-hashland-keccakpg
+ go-github-com-minio-blake2b-simd
+ go-github-com-minio-sha256-simd
+ go-github-com-mr-tron-base58
+ go-github-com-multiformats-go-varint
+ go-github-com-spaolacci-murmur3
+ go-golang-org-x-crypto
+ go-lukechampine-com-blake3))))
+
(define-public go-github-com-operatorfoundation-ed25519
(let ((commit "b22b4bd3ddef042eec45f3ee135cd40281fde2b4")
(revision "0"))
--
2.41.0
A
A
Artyom V. Poptsov wrote on 7 Apr 12:01 +0200
[PATCH 4/4] gnu: Add go-github-com-ipfs-go-cid.
(address . 70255@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
d4096865c7f8dc63e751980aa9e1b43c312562f4.1712483893.git.poptsov.artyom@gmail.com
* gnu/packages/ipfs.scm (go-github-com-ipfs-go-cid): New variable.

Change-Id: Ib285028ff3f93b4ec00dcc00ab557be4634acfb0
---
gnu/packages/ipfs.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index 0a1065535b..33c25d1ff4 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -39,6 +39,42 @@ (define-module (gnu packages ipfs)
#:use-module (gnu packages shells)
#:use-module (gnu packages syncthing))
+(define-public go-github-com-ipfs-go-cid
+ (package
+ (name "go-github-com-ipfs-go-cid")
+ (version "0.4.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ipfs/go-cid")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0gfd5dg0shj2daraai2kkf8sg24jp5cr6dsv857wp4q1ni612a23"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:go go-1.21
+ #:import-path "github.com/ipfs/go-cid"))
+ (propagated-inputs (list go-github-com-gxed-hashland-keccakpg
+ go-github-com-minio-blake2b-simd
+ go-github-com-minio-sha256-simd
+ go-github-com-mr-tron-base58
+ go-github-com-multiformats-go-base32
+ go-github-com-multiformats-go-base36
+ go-github-com-multiformats-go-multihash-0.2.3
+ go-github-com-multiformats-go-multibase
+ go-github-com-multiformats-go-varint
+ go-github-com-spaolacci-murmur3
+ go-golang-org-x-crypto))
+ (home-page "https://github.com/ipfs/go-cid")
+ (synopsis "Content ID v1 implemented in Go")
+ (description
+ "Implementation in Go of the @url{https://github.com/ipld/cid, CID spec}. It is
+used in @code{go-ipfs} and related packages to refer to a typed hunk of data.")
+ (license license:expat)))
+
(define-public go-github-com-ipfs-go-ipfs-cmdkit-files
(let ((commit
"386fcf8f18a185ec121676665fe2d9574496048d")
--
2.41.0
S
S
Sharlatan Hellseher wrote on 12 Apr 18:08 +0200
[PATCH 0/4] gnu: Add go-github-com-ipfs-go-cid.
(address . 70255-done@debbugs.gnu.org)
87edba7ed8.fsf@gmail.com
Hi,

Thank you for the patches.

Pushed as e74b591091..4d7a2c860e to master.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmYZXIMACgkQdtcnv/Ys
0rXnPA/+MgMnRnFNmejW4ItUTubSsMJIWDDHhigIwBtr0PovzRFMqsmG5IcBC+N1
fJnRV4+meUQ6a8VyiikrDkue7X0vq0E5ZKRGZ0nS2fE3XRAOupojl2Q0f+KXiiaO
PDHRB7LJzyW4ti4vIbEj3NTIJBBdsvjTdJw8NJOdCHW3iqJ+iqdoHV97O7IszAvO
09bgWyb1wl7JAY4CJLTBfwy6Lab9KCCjklrTS6fMQGYSJjlJBf6ZM/C0Wah5wSUp
PaL6raKqOHGvPuAbNf/C0PxrEV3NBnB/efR/27L28MNsBmeo1UIQqM5KPeRorFlB
XU5FlI1erQ61tJ36M4UB4+9lR0BAw5mirLDhwmo7hCeas/vePgOvH9YXKtQjLi2K
K7rf9APn3E5WvM6dDEKW6M8P0F+bZ7W+G50UHscI7XmbVZ3oCTGgf9NiW9fQAa3f
MdTgKdGNyzK11U5W4SfGxjXcjsf8WhmM2ytSlzn9NNmSWp+pVCCm0GBcwlkFnpiG
0leMVsdsOSK4+syNiY8XoRL7VjstPe9DFbfwRzIZvitIi8Pr7pWUYo5KDfY3/OPj
yocX1+xvwEHC8P/C/Vl/hk4AGu+cOkO27TgCJhE/V0pTYgLTdfLNGHSM+mbadbXH
P0uQ81OL4KPBGJEEV6x0y6O0KCw9uYxt1FBVS/yOJFNmzC9OJH0=
=ni4S
-----END PGP SIGNATURE-----

Closed
?