gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / ipfs.scm
index f40c118..5770199 100644 (file)
@@ -1,5 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +23,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix git-download)
+  #:use-module (guix download)
   #:use-module (guix build-system go)
   #:use-module (gnu packages golang))
 
@@ -34,7 +38,7 @@
         (origin
           (method git-fetch)
           (uri (git-reference
-                 (url "https://github.com/ipfs/go-ipfs-cmdkit.git")
+                 (url "https://github.com/ipfs/go-ipfs-cmdkit")
                  (commit commit)))
           (file-name (git-file-name name version))
           (sha256
@@ -62,7 +66,7 @@ that are shared between @command{go-ipfs/commands} and its rewrite
        (origin
          (method git-fetch)
          (uri (git-reference
-               (url "https://github.com/ipfs/go-ipfs-api.git")
+               (url "https://github.com/ipfs/go-ipfs-api")
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
@@ -84,12 +88,12 @@ that are shared between @command{go-ipfs/commands} and its rewrite
          ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
          ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
          ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
-         ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
+         ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
          ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
          ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
          ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
          ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
-         ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
+         ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
          ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
          ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
          ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
@@ -100,58 +104,54 @@ that are shared between @command{go-ipfs/commands} and its rewrite
       (license license:expat))))
 
 (define-public gx
-  (let ((commit
-          "89338e509426d2895f20086685cf4c77d64cc5df")
-        (revision "0"))
-    (package
-      (name "gx")
-      (version (git-version "0.14.0" revision commit))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url "https://github.com/whyrusleeping/gx.git")
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32
-           "08gh04jln8rxpq0j4fm4chjap162wp8cjwj9szbvj9c7123s42rd"))))
-      (build-system go-build-system)
-      (arguments
-       '(#:import-path "github.com/whyrusleeping/gx"))
-      (native-inputs
-       `(("go-github-com-blang-semver" ,go-github-com-blang-semver)
-         ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
-         ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
-         ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
-         ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
-         ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
-         ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
-         ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
-         ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
-         ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
-         ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
-         ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
-         ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
-         ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
-         ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
-         ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
-         ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
-         ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
-         ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
-         ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
-         ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
-         ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
-         ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
-         ("go-github-com-whyrusleeping-json-filter" ,go-github-com-whyrusleeping-json-filter)
-         ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
-         ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)))
-      (home-page "https://github.com/whyrusleeping/gx")
-      (synopsis "Package management tool using IPFS")
-      (description "@command{gx} is a packaging tool built around the
-distributed, content addressed filesystem IPFS.  It aims to be flexible,
+  (package
+    (name "gx")
+    (version "0.14.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/whyrusleeping/gx")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1sk20kv3rfsnizgwmcmmr69jb1b2iwzqh9wwwd6wg6x0pnqm8swc"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/whyrusleeping/gx"))
+    (native-inputs
+     `(("go-github-com-blang-semver" ,go-github-com-blang-semver)
+       ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
+       ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
+       ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
+       ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
+       ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
+       ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
+       ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
+       ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
+       ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
+       ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
+       ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
+       ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
+       ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
+       ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
+       ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
+       ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
+       ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
+       ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
+       ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
+       ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
+       ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
+       ("go-github-com-whyrusleeping-json-filter" ,go-github-com-whyrusleeping-json-filter)
+       ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
+       ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)
+       ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
+    (home-page "https://github.com/whyrusleeping/gx")
+    (synopsis "Package management tool using IPFS")
+    (description "@command{gx} is a packaging tool built around the
+distributed, content addressed file system IPFS.  It aims to be flexible,
 powerful and simple.")
-      (license license:expat))))
+    (license license:expat)))
 
 (define-public go-github-com-whyrusleeping-gx-util
   (package
@@ -198,15 +198,50 @@ powerful and simple.")
        ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
        ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
        ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
-       ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
        ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
-       ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
+       ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
        ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
        ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
        ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
-       ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)))
+       ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)
+       ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
     (home-page "https://github.com/whyrusleeping/gx-go")
     (synopsis "Golang subtool for the @command{gx} package manager")
     (description "A subtool for the @command{gx} package manager for packages
 written in Go.")
     (license license:expat)))
+
+(define-public go-ipfs
+  (package
+    (name "go-ipfs")
+    (version "0.8.0")
+    (source
+     (origin
+       (method url-fetch/tarbomb)
+       (uri (string-append
+             "https://dist.ipfs.io/go-ipfs/v" version
+             "/go-ipfs-source.tar.gz"))
+       (sha256
+        (base32 "0k2qzlfz8ks9c70rxsy7jvk6d2s6yll1b8v9k2kcw07r989gxbdq"))
+       (file-name (string-append name "-" version "-source"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:unpack-path "github.com/ipfs/go-ipfs"
+       #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs"
+       #:phases (modify-phases %standard-phases
+                  (add-before 'reset-gzip-timestamps 'make-files-writable
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; Make sure .gz files are writable so that the
+                      ;; 'reset-gzip-timestamps' phase can do its work.
+                      (let ((out (assoc-ref outputs "out")))
+                        (for-each make-file-writable
+                                  (find-files out "\\.gz$"))
+                        #t))))))
+    (home-page "https://ipfs.io")
+    (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol")
+    (description "IPFS is a global, versioned, peer-to-peer file system.  It
+combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web.  It is
+like a single bittorrent swarm, exchanging git objects.  IPFS provides an
+interface as simple as the HTTP web, but with permanence built in.  You can
+also mount the world at @code{/ipfs}.")
+    (license license:expat)))