unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Giacomo Leidi via Guix-patches via <guix-patches@gnu.org>
To: 74407@debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul@autistici.org>
Subject: [bug#74407] [PATCH v2] gnu: Add spritely-libp2p-daemon.
Date: Thu, 21 Nov 2024 00:40:07 +0100	[thread overview]
Message-ID: <060c9d80a646cfe6e7673cfb77dee4f466bb077f.1732146007.git.goodoldpaul@autistici.org> (raw)
In-Reply-To: <ac26775cbbe059fb2c3906d5b37379bde5434fcd.1731876356.git.goodoldpaul@autistici.org>

* gnu/packages/ipfs.scm (spritely-libp2p-daemon): New variable.

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

diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index d5849a3f18..8025e99d19 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2023, 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2024 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1217,3 +1218,56 @@ (define-public kubo
 
 (define-public go-ipfs
   (deprecated-package "go-ipfs" kubo))
+
+(define-public spritely-libp2p-daemon
+  (let ((version "0.1")
+        (commit "ae96196af1b68a5e23e58fa4afa818878b252a3d")
+        (revision "0"))
+    (package
+      (name "spritely-libp2p-daemon")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://gitlab.com/spritely/go-libp2p-daemon.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1g4szjm2rxvrgcir9gdn81bsnybvb7hc3dwymc3yarslwsr1h3qf"))))
+      (build-system go-build-system)
+      (arguments
+       (list
+        #:go go-1.21
+        #:import-path "gitlab.com/spritely/spritely-libp2p-daemon"
+        #:tests? #f
+        #:install-source? #f
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; libp2p-asn-util uses go://embed to embed a file, but Go
+            ;; does *not* accept files that are symlinks.  Guix sets up
+            ;; all dependency files as symlinks, though.  To work around
+            ;; this, we delete the symlink and copy over the file to be
+            ;; embedded.
+            (add-after 'unpack 'fix-libp2p-asn-util-embed
+              (lambda _
+                (let ((file-name
+                       (string-append
+                        "src/github.com/libp2p/go-libp2p-asn-util/"
+                        "sorted-network-list.bin")))
+                  (delete-file file-name)
+                  (copy-file
+                   (string-append #$go-github-com-libp2p-go-libp2p-asn-util
+                                  "/" file-name)
+                   file-name)))))))
+      (propagated-inputs
+       (list go-github-com-libp2p-go-libp2p
+             go-github-com-libp2p-go-libp2p-peer
+             go-github-com-libp2p-go-libp2p-crypto
+             go-github-com-multiformats-go-multiaddr))
+      (home-page "https://gitlab.com/spritely/go-libp2p-daemon")
+      (synopsis "Simple daemon to connect over libp2p")
+      (description "This package provides a very simple daemon to interface to
+from other programming languages.  It's designed to fulfill the needs of
+Spritely's Goblins library to support libp2p as a netlayer.")
+      (license license:asl2.0))))

base-commit: d108a7aac2c51f21c55cb8ea8801629a97f5242a
-- 
2.46.0





      reply	other threads:[~2024-11-20 23:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-17 20:45 [bug#74407] [PATCH] gnu: Add spritely-libp2p-daemon Giacomo Leidi via Guix-patches via
2024-11-20 23:40 ` Giacomo Leidi via Guix-patches via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=060c9d80a646cfe6e7673cfb77dee4f466bb077f.1732146007.git.goodoldpaul@autistici.org \
    --to=guix-patches@gnu.org \
    --cc=74407@debbugs.gnu.org \
    --cc=goodoldpaul@autistici.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).