[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
136/137: gnu: rbw: Install shell completions.
From: |
guix-commits |
Subject: |
136/137: gnu: rbw: Install shell completions. |
Date: |
Thu, 21 Dec 2023 04:26:49 -0500 (EST) |
efraim pushed a commit to branch rust-team
in repository guix.
commit 7cd6945833c57d9f665c4229ccfb4c3e47891880
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Dec 21 10:07:13 2023 +0200
gnu: rbw: Install shell completions.
* gnu/packages/rust-apps.scm (rbw)[arguments]: Add a phase to generate
and install the shell completions.
[native-inputs]: When cross-compiling add a copy of the package.
Change-Id: Ibf8a1cc17470ecce479b8043678aedcf5556778e
---
gnu/packages/rust-apps.scm | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 9b4e3fbeed..0be3b2b08d 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -2058,9 +2058,36 @@ runs a command whenever it detects modifications.")
("rust-totp-lite" ,rust-totp-lite-2)
("rust-url" ,rust-url-2)
("rust-uuid" ,rust-uuid-1)
- ("rust-zeroize" ,rust-zeroize-1))))
+ ("rust-zeroize" ,rust-zeroize-1))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-completions
+ (lambda* (#:key native-inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share"))
+ (rbw (if ,(%current-target-system)
+ (search-input-file native-inputs "/bin/rbw")
+ (string-append out "/bin/rbw"))))
+ (mkdir-p (string-append share "/bash-completion/completions"))
+ (with-output-to-file
+ (string-append share "/bash-completion/completions/rbw")
+ (lambda _ (invoke rbw "gen-completions" "bash")))
+ (mkdir-p (string-append share "/fish/vendor_completions.d"))
+ (with-output-to-file
+ (string-append share "/fish/vendor_completions.d/rbw.fish")
+ (lambda _ (invoke rbw "gen-completions" "fish")))
+ (mkdir-p (string-append share "/zsh/site-functions"))
+ (with-output-to-file
+ (string-append share "/zsh/site-functions/_rbw")
+ (lambda _ (invoke rbw "gen-completions" "zsh")))
+ (mkdir-p (string-append share "/elvish/lib"))
+ (with-output-to-file
+ (string-append share "/elvish/lib/rbw")
+ (lambda _ (invoke rbw "gen-completions" "elvish")))))))))
(native-inputs
- (list perl))
+ (cons* perl (if (%current-target-system)
+ (list this-package)
+ '())))
(home-page "https://git.tozt.net/rbw")
(synopsis "Unofficial Bitwarden CLI")
(description "This package is an unofficial command line client for
- 98/137: gnu: Add rust-winreg-0.50., (continued)
- 98/137: gnu: Add rust-winreg-0.50., guix-commits, 2023/12/21
- 111/137: gnu: Add rust-rcgen-0.10., guix-commits, 2023/12/21
- 110/137: gnu: Add rust-rsa-0.6., guix-commits, 2023/12/21
- 117/137: gnu: Add rust-pkcs5-0.4., guix-commits, 2023/12/21
- 119/137: gnu: Add rust-pem-rfc7468-0.3., guix-commits, 2023/12/21
- 106/137: gnu: Add rust-system-configuration-sys-0.5., guix-commits, 2023/12/21
- 104/137: gnu: rust-tracing-0.1: Update to 0.1.40., guix-commits, 2023/12/21
- 125/137: gnu: Add rust-der-derive-0.5., guix-commits, 2023/12/21
- 129/137: gnu: Add rust-crc-catalog-2., guix-commits, 2023/12/21
- 131/137: gnu: Add rust-const-oid-0.7., guix-commits, 2023/12/21
- 136/137: gnu: rbw: Install shell completions.,
guix-commits <=
- 109/137: gnu: rust-sha2-0.9: Update to 0.9.9., guix-commits, 2023/12/21
- 122/137: gnu: Add rust-h3-quinn-0.0.4., guix-commits, 2023/12/21
- 124/137: gnu: Add rust-enum-as-inner-0.6., guix-commits, 2023/12/21
- 132/137: gnu: Add rust-async-compression-0.4., guix-commits, 2023/12/21
- 32/137: gnu: Add rust-wmi-0.12., guix-commits, 2023/12/21
- 52/137: gnu: Add rust-pciid-parser-0.6., guix-commits, 2023/12/21
- 53/137: gnu: Add rust-os-release-0.1., guix-commits, 2023/12/21
- 62/137: gnu: rust-cpufeatures-0.2: Update to 0.2.11., guix-commits, 2023/12/21
- 67/137: gnu: Add rust-borsh-derive-0.10., guix-commits, 2023/12/21
- 78/137: gnu: rust-pbkdf2-0.12: Update to 0.12.2., guix-commits, 2023/12/21