From patchwork Wed Nov 20 23:40:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giacomo Leidi X-Patchwork-Id: 70606 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 CD19C27BBE9; Wed, 20 Nov 2024 23:41:31 +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=unavailable 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 6049627BBE2 for ; Wed, 20 Nov 2024 23:41:29 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDuJm-0004cN-Of; Wed, 20 Nov 2024 18:41:07 -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 1tDuJi-0004br-QC for guix-patches@gnu.org; Wed, 20 Nov 2024 18:41:02 -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 1tDuJi-0007Ru-In for guix-patches@gnu.org; Wed, 20 Nov 2024 18:41:02 -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=RC6w3Ptp4wKBf+7ITfsqadUVulHJvU4HGIE5FPomTYY=; b=HcDwKBMN/UbYfqi8Fn7DmtP6CxTLSehDCx02n0BGTFpPDELeD6i1n0v+ZSuKrHjmkeehDSgmgOiFlOBUhdHHaSGq5Cy4v8Eqae0Bu5k1KoHjV3iahLb7NNFEItG3NW9wu3HVCCcfpoKMLCxgVjmj1F0hoZJx0hGvcSSq9q3BKHLaHkXaQJCs8zp3ATtzz6h2ToPQQS3izvZkaHrrsZRfiiSfBD4ykd+e1iomFZoo273qKYroEOEn4+OOvFy6ZM1UGGiMVjVWiG6C5lGNicmqYvvFQQdKVglpbk4bQoNz4GjbMh/VblRQ0F0E0iefELyqILwPAVTfTfWT1eZF80Mvwg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDuJi-0007Dh-DQ for guix-patches@gnu.org; Wed, 20 Nov 2024 18:41:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74407] [PATCH v2] 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: Wed, 20 Nov 2024 23:41: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.173214602527701 (code B ref 74407); Wed, 20 Nov 2024 23:41:02 +0000 Received: (at 74407) by debbugs.gnu.org; 20 Nov 2024 23:40:25 +0000 Received: from localhost ([127.0.0.1]:48277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDuJ7-0007Ci-DM for submit@debbugs.gnu.org; Wed, 20 Nov 2024 18:40:25 -0500 Received: from confino.investici.org ([93.190.126.19]:29627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDuJ4-0007CZ-To for 74407@debbugs.gnu.org; Wed, 20 Nov 2024 18:40:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1732146021; bh=RC6w3Ptp4wKBf+7ITfsqadUVulHJvU4HGIE5FPomTYY=; h=From:To:Cc:Subject:Date:From; b=PBoyl95hhIq8UP2HQrmmBESdvn9VGtJYULZ358yih9YML0mBxiCu1TsN3g+Bpl175 t+2JT9ghz1EynPvCOfsSxQ+mYs5enPtcS1sDT3Q6ZP/2GexytZ59Z+e6hSm1qHHy2o TDFhtgalYxqqCzFVEpufgbf8+DVYnB24rgW3tFpU= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XtyXP3kQmz111v; Wed, 20 Nov 2024 23:40:21 +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 4XtyXP2t3vz111b; Wed, 20 Nov 2024 23:40:21 +0000 (UTC) Date: Thu, 21 Nov 2024 00:40:07 +0100 Message-ID: <060c9d80a646cfe6e7673cfb77dee4f466bb077f.1732146007.git.goodoldpaul@autistici.org> 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: d108a7aac2c51f21c55cb8ea8801629a97f5242a 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 ;;; 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 "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))))