diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2026-03-10 17:46:14 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-03-10 17:56:25 +0200 |
| commit | a9326410acedb8f947d6de3223028cb664b165d8 (patch) | |
| tree | 19b4298de4d3b0b71e58e8e9df58b1edb3bd298d /gnu | |
| parent | 284f21a0410cc7ce411c7d179e17225f8ea48537 (diff) | |
gnu: eww: Install shell completions.
* gnu/packages/wm.scm (eww)[arguments]: Add a phase to generate and
install the shell completions.
[native-inputs]: When cross-compiling add a native version of this
package.
Change-Id: I3a667b3de3c62b0683f841b3a3fc63b525be3056
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/wm.scm | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index a766008a987..5bdc1865a06 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -1825,16 +1825,44 @@ drags, snap-to-border support, and virtual desktops.") (base32 "0ihgcxppywpcp24zhws1if6h7cxbrq2vd53wyh36j5mxylpbi59w")))) (build-system cargo-build-system) (arguments - (list #:install-source? #f - #:features ''("x11" "wayland") - #:cargo-install-paths ''("crates/eww"))) + (list + #:install-source? #f + #:features ''("x11" "wayland") + #:cargo-install-paths ''("crates/eww") + #: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/eww") + (in-vicinity #$output "bin/eww")))) + (with-output-to-file (in-vicinity #$output path) + (lambda _ + (invoke binary "shell-completions" "--shell" shell)))))) + '(("bash" . "share/bash-completion/completions/eww") + ("elvish" . "share/elvish/lib/eww") + ("fish" . "share/fish/vendor_completions.d/eww.fish") + ("zsh" . "share/zsh/site-functions/_eww")))))))) (inputs (cons* gdk-pixbuf glib gtk+ gtk-layer-shell libdbusmenu (cargo-inputs 'eww))) - (native-inputs (list pkg-config)) + (native-inputs + (append (if (%current-target-system) + (list this-package) + '()) + (list pkg-config))) (home-page "https://elkowar.github.io/eww/") (synopsis "Widget system that works in any window manager") (description |
