From patchwork Sat Dec 7 20:29:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giacomo Leidi X-Patchwork-Id: 34647 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 122A627BBEA; Sat, 7 Dec 2024 20:31:34 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D3AED27BBE2 for ; Sat, 7 Dec 2024 20:31:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tK1SL-0000nH-FW; Sat, 07 Dec 2024 15:31:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tK1SI-0000me-FH for guix-patches@gnu.org; Sat, 07 Dec 2024 15:31:10 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tK1SA-0005fG-Gw for guix-patches@gnu.org; Sat, 07 Dec 2024 15:31:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=cKQBhhBehLR7cvSLvS92TlMI12Z6phUCf7WllX10dLA=; b=E/lCRXzh8PT0CnGT7bRrbFmkNmeEu/I8L2GkE9zqukuLzDIdU278EQVoVfgtaZ5Eck+B1RQV+x77mUCmfTJRAJqTAMGLbCzcwqXAMHmyeePzzMdVCjUl18fPvTh4JLsh/VmFQpEoPapwA0ETQOh633suD2auQAWbl+y1YCQwxf0ZC9LvITVAouAuJrlGmEbc7DCbrqRCaAFvkgHh5WyaJ6bTCQO3HpvnFFVsgCBsHU5mZMLrTwKijZbJknVNLh0ZecGRS21jzsrDH/88VhaXt/PbYuqiinFvxrJzO+TQge4zi2/titWXfR6uwr97UoA5I4t7bCJ14utBNv76tW2XKA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tK1SA-0001SL-2w for guix-patches@gnu.org; Sat, 07 Dec 2024 15:31:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74407] [PATCH v3] gnu: Add spritely-libp2p-daemon. References: In-Reply-To: Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Dec 2024 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74407 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74407@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 74407-submit@debbugs.gnu.org id=B74407.17336034105160 (code B ref 74407); Sat, 07 Dec 2024 20:31:02 +0000 Received: (at 74407) by debbugs.gnu.org; 7 Dec 2024 20:30:10 +0000 Received: from localhost ([127.0.0.1]:48673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tK1RK-0001L9-4j for submit@debbugs.gnu.org; Sat, 07 Dec 2024 15:30:10 -0500 Received: from confino.investici.org ([93.190.126.19]:48749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tK1RH-0001Jj-72 for 74407@debbugs.gnu.org; Sat, 07 Dec 2024 15:30:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1733603405; bh=cKQBhhBehLR7cvSLvS92TlMI12Z6phUCf7WllX10dLA=; h=From:To:Cc:Subject:Date:From; b=fXjeEDxUK68Zx1938t0Ezp22fK4KWnqePQ3vphzsYQEgK/iAV4M3dcVZ0TIzgFHvA ZBQliqMXvdGdv0795XYAJBPiXTXc9FeGNSVUYggnVisYC29pRW55ejBjmPkkS+1lOP rwdlLmNzXRYv6w9gmNZV6PcD2T1OBiAo2LO1GD6E= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Y5KW169PXz111m; Sat, 7 Dec 2024 20:30:05 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4Y5KW1575Bz1112; Sat, 7 Dec 2024 20:30:05 +0000 (UTC) Date: Sat, 7 Dec 2024 21:29:46 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches X-Patchwork-Original-From: Giacomo Leidi via Guix-patches via From: Giacomo Leidi Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ipfs.scm (spritely-libp2p-daemon): New variable. Change-Id: Ic47e24bc53cb8da89be2c064569feae77764a03b --- gnu/packages/ipfs.scm | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) base-commit: 006679d1e6ca7acea0629b4f019c8cf89cde08be diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm index d5849a3f18..bed34a21be 100644 --- a/gnu/packages/ipfs.scm +++ b/gnu/packages/ipfs.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2022 Maxime Devos ;;; Copyright © 2023, 2024 Artyom V. Poptsov ;;; Copyright © 2024 Sharlatan Hellseher +;;; Copyright © 2024 Giacomo Leidi ;;; ;;; 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 "f10d8c4bad2a50d6e481c0b57231741d079ffedb") + (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 "0bk2610rlg8d4lla7h7sic9drv1syabfbr7kbg2yqqbhiwg0v2br")))) + (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))))