From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OEEzF8VTIGM0IgAAbAwnHQ (envelope-from ) for ; Tue, 13 Sep 2022 11:56:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MKFFFsVTIGMdKAEAG6o9tA (envelope-from ) for ; Tue, 13 Sep 2022 11:56:21 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D15F39D88 for ; Tue, 13 Sep 2022 11:56:20 +0200 (CEST) Received: from localhost ([::1]:54880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oY2eQ-0001at-M8 for larch@yhetil.org; Tue, 13 Sep 2022 05:56:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oY2aI-00072t-Uy for guix-patches@gnu.org; Tue, 13 Sep 2022 05:52:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oY2aI-000866-LZ for guix-patches@gnu.org; Tue, 13 Sep 2022 05:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oY2aI-0006CM-2K for guix-patches@gnu.org; Tue, 13 Sep 2022 05:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57722] [PATCH] gnu: ipfs: Install bash completion. Resent-From: Michael Rohleder Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Sep 2022 09:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57722 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 57722@debbugs.gnu.org Received: via spool by 57722-submit@debbugs.gnu.org id=B57722.166306266623761 (code B ref 57722); Tue, 13 Sep 2022 09:52:02 +0000 Received: (at 57722) by debbugs.gnu.org; 13 Sep 2022 09:51:06 +0000 Received: from localhost ([127.0.0.1]:48879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oY2ZL-0006B8-C8 for submit@debbugs.gnu.org; Tue, 13 Sep 2022 05:51:06 -0400 Received: from wp224.webpack.hosteurope.de ([80.237.132.231]:39918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oY2ZG-0006Ad-Nr for 57722@debbugs.gnu.org; Tue, 13 Sep 2022 05:51:02 -0400 Received: from www.rohleder.de ([37.61.204.227]); authenticated by wp224.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1oY2ZE-0007Nq-KZ; Tue, 13 Sep 2022 11:50:56 +0200 Received: from [192.168.1.3] (helo=micha) by www.rohleder.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oY2YE-000I1G-Lr; Tue, 13 Sep 2022 11:50:56 +0200 From: Michael Rohleder References: <20220910214721.9993-1-mike@rohleder.de> <5d80a74a-fb2f-2236-a722-62e9d20b8487@telenet.be> Date: Tue, 13 Sep 2022 11:49:57 +0200 In-Reply-To: <5d80a74a-fb2f-2236-a722-62e9d20b8487@telenet.be> (Maxime Devos's message of "Sun, 11 Sep 2022 13:47:58 +0200") Message-ID: <87k067ppru.fsf@rohleder.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-bounce-key: webpack.hosteurope.de;mike@rohleder.de;1663062658;bc20d8dc; X-HE-SMSGID: 1oY2ZE-0007Nq-KZ 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663062981; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=KFySC7WmntsT+n0DHPks5r63EC9q4yalZatje2iSTAk=; b=YIwIT7LQg4gPjtcKDuc9rSy5++kCaxJ90+549XUtx3JUzo+Z9EXofQiNG+hN0Az2IxYhWR +jRAj8tiFSvH/Sp375tYkF4yNtKxWM27v6bR5xJ7vqS/at3iHMLwyegBqpY8oJRgJUMd8J Rfyw4MSP4+e6HATz3H4a/i3iOJu5YU37RhyISMN3iM8qMnW8LBui190SIH3Nk/eH1qfQu7 kKj1XZdUk+/ZtTJna0M1BZfNvTkbjMRSGE3COCiDVcSxlmBuwe6rzEyECeDsrahJHnJMV+ Cfa03hSNbgLVb1pDEzJSzvsywPLvDfameq2+hNnTZ4YnQKbLYbnOwiMxn32Fkw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663062981; a=rsa-sha256; cv=none; b=JVNE6ZAUmg8eWm9RUGvspBDi0iNy8Mdz3fRZaLkUdM2dI+HBQz/gf6li9fm/Vp3Pn+m2Tc iXti3gurFVnlA2PK1upGZhijQGaxr52jiWrox/OkudwxVb+NnVPgEPrfcbNm0U3qPg+Im3 PGhdGERQrAjURs421knEFiVjGcO9vGxhkNQxNbMaVmClOvUt3svyONr/tTzyUsBKFsRRMi PaI9DDEZo+rQtZk+HrV+WVEqBmK+id8ML6VwIcCM2HAXnWWuY7gmxRnxKAZLZLq76YC2UA YwP+CIxxJrJpFEU1E7QjlW0ms7qQbJ2kMibfKzTvIjl1TJxcmy8CnkRO0ZWKng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.11 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D15F39D88 X-Spam-Score: -5.11 X-Migadu-Scanner: scn1.migadu.com X-TUID: sfXjDYyyXVeD --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hey Maxime, Thank you for reviewing and your helpful tips! Here is a second version, I hope it's better. I dont know how to test cross compiling, though (on a x86_64 system): ./pre-inst-env guix build --system=aarch64-linux go-ipfs [...] building /gnu/store/ssvif7gdgv7xn7jmgmcp4ws71fgmwn5x-go-ipfs-0.11.0.drv... ;;; Stat of /tmp/guix-build-go-ipfs-0.11.0.drv-0/guile failed: ;;; In procedure stat: No such file or directory: "/tmp/guix-build-go-ipfs-0.11.0.drv-0/guile" Backtrace: 0 (primitive-load "/tmp/guix-build-go-ipfs-0.11.0.drv-0/g?") ERROR: In procedure primitive-load: In procedure open-file: No such file or directory: "/tmp/guix-build-go-ipfs-0.11.0.drv-0/guile" And then I'm completely lost and confused. ;) --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-go-ipfs-Install-bash-completion.patch Content-Transfer-Encoding: quoted-printable Content-Description: go-ipfs: Install bash completion. From=20bbf32c53a2402f6f123d00d2e5ece9efdbf10504 Mon Sep 17 00:00:00 2001 From: Michael Rohleder Date: Tue, 13 Sep 2022 11:29:23 +0200 Subject: [PATCH] gnu: go-ipfs: Install bash completion. * gnu/packages/ipfs.scm (go-ipfs)[arguments]: Use gexp. Add 'install-bashcompletion phase to install bash completion. =2D-- gnu/packages/ipfs.scm | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm index ccc36007b4..d1e04c3ae0 100644 =2D-- a/gnu/packages/ipfs.scm +++ b/gnu/packages/ipfs.scm @@ -2,7 +2,7 @@ ;;; Copyright =C2=A9 2018 Pierre Neidhardt ;;; Copyright =C2=A9 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2019, 2020 Martin Becze =2D;;; Copyright =C2=A9 2020, 2021 Michael Rohleder +;;; Copyright =C2=A9 2020, 2021, 2022 Michael Rohleder ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +22,7 @@ (define-module (gnu packages ipfs) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix download) #:use-module (guix build-system go) @@ -229,10 +230,28 @@ (define-public go-ipfs (file-name (string-append name "-" version "-source")))) (build-system go-build-system) (arguments =2D `(#:unpack-path "github.com/ipfs/go-ipfs" =2D #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs")) + (list + #:unpack-path "github.com/ipfs/go-ipfs" + #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs" + #:phases + #~(modify-phases %standard-phases + ;; https://github.com/ipfs/kubo/blob/master/docs/command-complet= ion.md + (add-after 'install 'install-bashcompletion + (lambda _ + (let ((completiondir (string-append #$output + "/etc/bash_completion.d"= ))) + (mkdir-p completiondir) + (with-output-to-file (string-append completiondir "/ipfs") + (lambda _ + (invoke #$(if (%current-target-system) + "ipfs" + #~(string-append #$output "/bin/ipfs")) + "commands" "completion" "bash"))))))))) (native-inputs =2D (list python-minimal-wrapper zsh)) + (append (if (%current-target-system) + (list this-package) + '()) + (list python-minimal-wrapper zsh))) (home-page "https://ipfs.io") (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protoc= ol") (description "IPFS is a global, versioned, peer-to-peer file system. = It =2D-=20 2.37.3 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Nichts ist in der Welt ist so gerecht verteilt wie der Verstand.=20 Jedermann ist der Meinung, dass er genuegend davon hat. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFFBAEBCAAvFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAmMgUkURHG1pa2VAcm9o bGVkZXIuZGUACgkQfHr/vv7yyyVrlwf/dGqZZQltkSkjBiZXlGSikHul2/r9xvLz /MVyg2IZUmpygMXIqp1lfAn4SQYzsEzBwEfjdUecwV2YJ5XzA3q8tha0D4L59ctX SGthJjQICRlAIqGj/TXBGrFjv7lLqPvYj2qanGhPaCTuWfUfjXjY03lLMKd2BzlG 32cTg/dDt0dzTN47X7zt1pXaSg2T/Xha39mlUoFetUsPiFBYGMLOC//5YZA+nxSv X6/t5XNQdtx+duk0aS95DODO3CYOX4SH+agLdEAzQvOJb2TUbpqaZ/B+MHWs5zqq LMedHzI7KKZ5niKmpUZbAcRcZDNb02N1w0GcnKY8DT2qJoTgSrZyLQ== =wYfj -----END PGP SIGNATURE----- --==-=-=--