From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 6ByqHmMGHWPcQAAAbAwnHQ (envelope-from ) for ; Sat, 10 Sep 2022 23:49:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ENF9HmMGHWNelAAAauVa8A (envelope-from ) for ; Sat, 10 Sep 2022 23:49:23 +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 23A1B29393 for ; Sat, 10 Sep 2022 23:49:22 +0200 (CEST) Received: from localhost ([::1]:54616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX8Lp-0003Sz-Ry for larch@yhetil.org; Sat, 10 Sep 2022 17:49:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX8LW-0003RY-L7 for guix-patches@gnu.org; Sat, 10 Sep 2022 17:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX8LW-0007fQ-9X for guix-patches@gnu.org; Sat, 10 Sep 2022 17:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX8LW-00062S-1E for guix-patches@gnu.org; Sat, 10 Sep 2022 17:49: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: Sat, 10 Sep 2022 21:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57722 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57722@debbugs.gnu.org Cc: Michael Rohleder X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166284651023171 (code B ref -1); Sat, 10 Sep 2022 21:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Sep 2022 21:48:30 +0000 Received: from localhost ([127.0.0.1]:40479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX8L0-00061e-Ad for submit@debbugs.gnu.org; Sat, 10 Sep 2022 17:48:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:32820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX8Ky-00061W-7v for submit@debbugs.gnu.org; Sat, 10 Sep 2022 17:48:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX8Ky-0002u1-3D for guix-patches@gnu.org; Sat, 10 Sep 2022 17:48:28 -0400 Received: from wp224.webpack.hosteurope.de ([2a01:488:42:1000:50ed:84e7::]:40568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX8Kw-0007aw-6w for guix-patches@gnu.org; Sat, 10 Sep 2022 17:48:27 -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 1oX8Kq-0000G9-EE; Sat, 10 Sep 2022 23:48:20 +0200 Received: from [192.168.1.3] (helo=micha.rohleder.de) by www.rohleder.de with esmtp (Exim 4.95) (envelope-from ) id 1oX8Jh-000eqs-UP; Sat, 10 Sep 2022 23:48:20 +0200 From: Michael Rohleder Date: Sat, 10 Sep 2022 23:47:21 +0200 Message-Id: <20220910214721.9993-1-mike@rohleder.de> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;mike@rohleder.de;1662846506;de92319b; X-HE-SMSGID: 1oX8Kq-0000G9-EE Received-SPF: permerror client-ip=2a01:488:42:1000:50ed:84e7::; envelope-from=mike@rohleder.de; helo=wp224.webpack.hosteurope.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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=1662846563; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=xC8yNHi+ZGA3N8GD8akk5vtQm6XdCZ8OYXaabOrk2kM=; b=c/RPo4DHcOqs+62IC5ykW/4KaEBQ48Xj+SBYlSqAn0QIL2jPCEtv5m5/VlxM+fUASUHNC6 1fL0ITHiq5BPc2bWLbM1GSNLDtG3I06nycIbdgjA/9Bg1VEZHJb1ZvgVnaeUybImhRhJ6F F6FssY2nMr4Z3foB+9zwvWuHinxKQNy9TTVm6V/ukoOK/S4qsQZZUfutNS2Tv/UA/i26p0 r4+Chl8q164U+Z0y8QaS/vagEiBK6CRL94n6Ud3eX2ZpVr+6YDuSh/sjrFQCGE2RdLCWsW m3a/QIGy3YQ0yBI2o9WRe5kcao+Kbw52Qxz1ZUbjCDpcXZGmvzLon1YT03Ngsw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662846563; a=rsa-sha256; cv=none; b=nvCK3Pf0/BmJHyc+zsH4Lx4V4mRqfEWsBeWSojZFwdjeskFY+EqDRxQ/YMn5v/8vorOkRL AACxlrAQJn22/F8W4iApPaA3r6wmgDV6pqr4LkmqGq0ggKEVcAz+XdhUa6AhiTLclJpNts u5ab4wnFomh3aQtOI5XhntbA8dL8ESa/gF9QrSIW5l4OOpr/gJ3U81QipZ8EK90grarfeg B5oKIB28h3YR46bzX87jSt0kcvB60oWVz6r5QIkIs9PQ8NwlkRPxkpqZmF0H7nQltjsZXh p+4OsfgNriZwdRtAMJJR07qExA8WFV0SOqJYX5+sEfXl/977wsg6a1HR2ff3Ow== 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: -2.10 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: 23A1B29393 X-Spam-Score: -2.10 X-Migadu-Scanner: scn1.migadu.com X-TUID: rNgkDNbUfazq * gnu/packages/ipfs.scm (ipfs)[arguments]: Add 'install-bashcompletion phase to install bash completion. --- gnu/packages/ipfs.scm | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm index ccc36007b4..faa209bf2a 100644 --- a/gnu/packages/ipfs.scm +++ b/gnu/packages/ipfs.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020 Martin Becze -;;; Copyright © 2020, 2021 Michael Rohleder +;;; Copyright © 2020, 2021, 2022 Michael Rohleder ;;; ;;; This file is part of GNU Guix. ;;; @@ -230,7 +230,26 @@ (define-public go-ipfs (build-system go-build-system) (arguments `(#:unpack-path "github.com/ipfs/go-ipfs" - #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs")) + #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs" + #:modules ((guix build utils) + (guix build go-build-system) + (ice-9 popen) + (ice-9 textual-ports)) + #:phases + (modify-phases %standard-phases + ;; https://github.com/ipfs/kubo/blob/master/docs/command-completion.md + (add-after 'install 'install-bashcompletion + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (completiondir (string-append out "/etc/bash_completion.d"))) + (mkdir-p completiondir) + (call-with-output-file (string-append completiondir "/ipfs") + (lambda (port) + (let ((input-pipe (open-pipe* OPEN_READ + (string-append out "/bin/ipfs") + "commands" "completion" "bash"))) + (display (get-string-all input-pipe) port) + (close-pipe input-pipe)))))))))) (native-inputs (list python-minimal-wrapper zsh)) (home-page "https://ipfs.io") -- 2.37.3