[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/08: gnu: go-ipfs: Install bash completion.
From: |
guix-commits |
Subject: |
08/08: gnu: go-ipfs: Install bash completion. |
Date: |
Wed, 14 Sep 2022 17:38:12 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit d9b7982ba58fdea0934b60a81f507440a56c82ee
Author: Michael Rohleder <mike@rohleder.de>
AuthorDate: Tue Sep 13 11:29:23 2022 +0200
gnu: go-ipfs: Install bash completion.
* gnu/packages/ipfs.scm (go-ipfs)[arguments]: Use gexp.
Add 'install-bashcompletion phase to install bash completion.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
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
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
-;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
;;;
;;; 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 @@ written in Go.")
(file-name (string-append name "-" version "-source"))))
(build-system go-build-system)
(arguments
- `(#:unpack-path "github.com/ipfs/go-ipfs"
- #: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-completion.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
- (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 protocol")
(description "IPFS is a global, versioned, peer-to-peer file system. It
- branch master updated (883d4e0abf -> d9b7982ba5), guix-commits, 2022/09/14
- 01/08: gnu: xsimd: Update to 9.0.1., guix-commits, 2022/09/14
- 06/08: gnu: gnome-mines: Fix build., guix-commits, 2022/09/14
- 04/08: gnu: stunnel: Update to 5.66., guix-commits, 2022/09/14
- 05/08: gnu: mousepad: Fix build., guix-commits, 2022/09/14
- 07/08: gnu: podman: Install shell completions., guix-commits, 2022/09/14
- 08/08: gnu: go-ipfs: Install bash completion.,
guix-commits <=
- 03/08: gnu: rsync: Update to 3.2.6., guix-commits, 2022/09/14
- 02/08: gnu: xsimd-benchmark: Build example., guix-commits, 2022/09/14