summary refs log tree commit diff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-07-07 15:07:21 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-07-07 15:07:42 +0100
commit9e1099af3e7861342a382df3be9e1154f075f832 (patch)
treedf6e675aed24caefa8efde14dc14676090287821
parent6236ae32aab98e62d4b3c00c979e6c87108d9220 (diff)
downloadguix-9e1099af3e7861342a382df3be9e1154f075f832.tar.gz
gnu: Add go-github-com-ipfs-go-ipld-git.
* gnu/packages/ipfs.scm (go-github-com-ipfs-go-ipld-git): New variable.

Change-Id: I9f7e4c1f086294a6024da167ba89f8251e0357b6
-rw-r--r--gnu/packages/ipfs.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index f548e4a25e..292116c9cd 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -302,6 +302,48 @@ throughout its lifetime.")
      "An implementation of a @url{https://cbor.io/, CBOR} encoded merkledag object.")
     (license license:expat)))
 
+(define-public go-github-com-ipfs-go-ipld-git
+  (package
+    (name "go-github-com-ipfs-go-ipld-git")
+    (version "0.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ipfs/go-ipld-git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1v52qzgmx7qym0qzkzkry2kfj58f9hh7c8qycg74sqbd9zb1ynjj"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      ;; XXX: It requires .git/objects, check if it's applicable to generate
+      ;; git repo during check phase with make-test-repo.sh.
+      #:tests? #f
+      #:import-path "github.com/ipfs/go-ipld-git"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'remove-test-data-files
+            (lambda* (#:key import-path #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (for-each delete-file
+                          (list "testdata.tar.gz"
+                                "codecov.yml"
+                                "make-test-repo.sh"))))))))
+    (propagated-inputs
+     (list go-github-com-multiformats-go-multihash
+           go-github-com-ipld-go-ipld-prime
+           go-github-com-ipfs-go-cid
+           go-github-com-ipfs-go-block-format))
+    (home-page "https://github.com/ipfs/go-ipld-git")
+    (synopsis "IPLD handlers for git objects")
+    (description
+     "This is an IPLD codec which handles git objects.  Objects are transformed into
+IPLD graph as detailed below.  Objects are demonstrated here using both
+@url{https://ipld.io/docs/schemas/,IPLD Schemas} and example JSON forms.")
+    (license license:expat)))
+
 (define-public go-github-com-ipfs-go-ipld-format
   (package
     (name "go-github-com-ipfs-go-ipld-format")