summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2026-03-15 18:04:26 +0200
committerEfraim Flashner <efraim@flashner.co.il>2026-03-15 19:18:22 +0200
commitce6dedf8005866f2ad57c714fc15113bdce4afdf (patch)
tree4aa530b4cdbe0c4113f65adc0fbd051139909600 /gnu/packages
parent72ac773a3e335959d337de2a9509e8931202e78e (diff)
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
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/task-management.scm30
1 files changed, 29 insertions, 1 deletions
diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm
index d06d0b4ae06..3fd85b8af07 100644
--- a/gnu/packages/task-management.scm
+++ b/gnu/packages/task-management.scm
@@ -608,7 +608,35 @@ export, password protection and auto-saving.")
(arguments
(list
#: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))
(home-page "https://github.com/Nukesor/pueue")
(synopsis