1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-28 03:51:53 +02:00

gnu: pueue: Install shell completions.

* gnu/packages/task-management.scm (pueue)[arguments]: Add a phase to
install the shell completions.
[native-inputs]: When cross-compiling add this package.

Change-Id: I36a61e699ba511bef92718feae65aa865782052e
This commit is contained in:
Efraim Flashner
2026-03-15 18:04:26 +02:00
parent 72ac773a3e
commit ce6dedf800
+29 -1
View File
@@ -608,7 +608,35 @@ export, password protection and auto-saving.")
(arguments (arguments
(list (list
#:cargo-install-paths ''("pueue") #:cargo-install-paths ''("pueue")
#:install-source? #f)) #:install-source? #f
#:modules
'((guix build cargo-build-system)
(guix build utils)
(ice-9 match))
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'install-completions
(lambda* (#:key native-inputs #:allow-other-keys)
(for-each
(match-lambda
((shell . path)
(mkdir-p (in-vicinity #$output (dirname path)))
(let ((binary
(if #$(%current-target-system)
(search-input-file native-inputs "bin/pueue")
(in-vicinity #$output "bin/pueue"))))
(with-output-to-file (in-vicinity #$output path)
(lambda _
(invoke binary "completions" shell))))))
'(("bash" . "share/bash-completion/completions/pueue")
("elvish" . "share/elvish/lib/pueue")
("fish" . "share/fish/vendor_completions.d/pueue.fish")
("nushell" . "share/nushell/vendor/autoload/pueue")
("zsh" . "share/zsh/site-functions/_pueue"))))))))
(native-inputs
(if (%current-target-system)
(list this-package)
'()))
(inputs (cargo-inputs 'pueue)) (inputs (cargo-inputs 'pueue))
(home-page "https://github.com/Nukesor/pueue") (home-page "https://github.com/Nukesor/pueue")
(synopsis (synopsis