diff options
| author | Zheng Junjie <z572@z572.online> | 2026-06-29 20:14:33 +0800 |
|---|---|---|
| committer | Cayetano Santos <csantosb@inventati.org> | 2026-07-02 11:34:07 +0200 |
| commit | 09aeafdf4b5a56bcbe3670cbf0904ee2de087d36 (patch) | |
| tree | bd63a1fddad4d195fa059861f8e25adb3e81f434 /gnu | |
| parent | d11a4d858be332b2c3ccb72671ea61bb645d4c1b (diff) | |
gnu: radicle: install completions.
* gnu/packages/rust-apps.scm (radicle)[arguments]: Add <#:modules>
<#:phases>: Add install-completions phase.
[native-inputs]: When cross-compiling, add this-package.
Merges guix/guix!9613
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/rust-apps.scm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 14bcfbfdd5b..b6bd4bb449e 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm | |||
| @@ -5068,6 +5068,10 @@ policies, and so on. | |||
| 5068 | '(list "--" | 5068 | '(list "--" |
| 5069 | ;; Different order of fields in expected vs actual JSON | 5069 | ;; Different order of fields in expected vs actual JSON |
| 5070 | "--skip=commands::utility::rad_config") | 5070 | "--skip=commands::utility::rad_config") |
| 5071 | #:modules | ||
| 5072 | '((guix build cargo-build-system) | ||
| 5073 | (guix build utils) | ||
| 5074 | (ice-9 match)) | ||
| 5071 | #:phases | 5075 | #:phases |
| 5072 | #~(modify-phases %standard-phases | 5076 | #~(modify-phases %standard-phases |
| 5073 | (add-after 'unpack 'setenv | 5077 | (add-after 'unpack 'setenv |
| @@ -5076,6 +5080,23 @@ policies, and so on. | |||
| 5076 | (setenv "LIBGIT2_NO_VENDOR" "1") | 5080 | (setenv "LIBGIT2_NO_VENDOR" "1") |
| 5077 | (setenv "HOME" (getcwd)) | 5081 | (setenv "HOME" (getcwd)) |
| 5078 | (setenv "TMPDIR" "/tmp"))) | 5082 | (setenv "TMPDIR" "/tmp"))) |
| 5083 | (add-after 'install 'install-completions | ||
| 5084 | (lambda* (#:key native-inputs #:allow-other-keys) | ||
| 5085 | (for-each | ||
| 5086 | (match-lambda | ||
| 5087 | ((shell . path) | ||
| 5088 | (mkdir-p (in-vicinity #$output (dirname path))) | ||
| 5089 | (let ((binary | ||
| 5090 | #$@(if (%current-target-system) | ||
| 5091 | #~((search-input-file native-inputs "bin/rad")) | ||
| 5092 | #~((in-vicinity #$output "bin/rad"))))) | ||
| 5093 | (with-output-to-file (in-vicinity #$output path) | ||
| 5094 | (lambda _ | ||
| 5095 | (invoke binary "completion" shell)))))) | ||
| 5096 | '(("bash" . "share/bash-completion/completions/rad") | ||
| 5097 | ("elvish" . "share/elvish/lib/rad") | ||
| 5098 | ("fish" . "share/fish/vendor_completions.d/rad.fish") | ||
| 5099 | ("zsh" . "share/zsh/site-functions/_rad"))))) | ||
| 5079 | #$@(if (this-package-native-input "ruby-asciidoctor") | 5100 | #$@(if (this-package-native-input "ruby-asciidoctor") |
| 5080 | #~((add-before 'build 'build-doc | 5101 | #~((add-before 'build 'build-doc |
| 5081 | (lambda _ | 5102 | (lambda _ |
| @@ -5092,6 +5113,9 @@ policies, and so on. | |||
| 5092 | (if (supported-package? ruby-asciidoctor) | 5113 | (if (supported-package? ruby-asciidoctor) |
| 5093 | (list ruby-asciidoctor) | 5114 | (list ruby-asciidoctor) |
| 5094 | '()) | 5115 | '()) |
| 5116 | (if (%current-target-system) | ||
| 5117 | (list this-package) | ||
| 5118 | '()) | ||
| 5095 | (list pkg-config | 5119 | (list pkg-config |
| 5096 | ;; for test | 5120 | ;; for test |
| 5097 | git-minimal/pinned))) | 5121 | git-minimal/pinned))) |
