diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2026-06-14 11:07:09 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-06-14 11:15:35 +0300 |
| commit | c78672eed3c4a1a9cb2818ccae0138370ca522b5 (patch) | |
| tree | 84ad90dc6c276a62ebfbcc9f5c715c0469446802 /gnu/packages/rust-apps.scm | |
| parent | 65bf86c92e460190ee6f87fe2d6f78af51c1f55b (diff) | |
gnu: rabbitmqadmin: Install shell completions.
* gnu/packages/rust-apps.scm (rabbitmqadmin)[arguments]: Add a phase to
install the shell completions.
[native-inputs]: Add this-package when cross-compiling.
Change-Id: I6f4648b2d2fb96a6ca5d4a513ce2efde573116ff
Diffstat (limited to 'gnu/packages/rust-apps.scm')
| -rw-r--r-- | gnu/packages/rust-apps.scm | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 66b6f06cc64..dc055c071e5 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm | |||
| @@ -4944,9 +4944,38 @@ minimum contrast levels, and more.") | |||
| 4944 | (base32 "1js79z4darfc0a16qq3m3c82yfpv3z7r2vpwkwk907vhvg5r1xjw")))) | 4944 | (base32 "1js79z4darfc0a16qq3m3c82yfpv3z7r2vpwkwk907vhvg5r1xjw")))) |
| 4945 | (build-system cargo-build-system) | 4945 | (build-system cargo-build-system) |
| 4946 | (arguments | 4946 | (arguments |
| 4947 | (list #:tests? #f ;Tests require local instance of RabbitMQ broker. | 4947 | (list |
| 4948 | #:install-source? #f)) | 4948 | #:tests? #f ;Tests require local instance of RabbitMQ broker. |
| 4949 | #:install-source? #f | ||
| 4950 | #:modules | ||
| 4951 | '((guix build cargo-build-system) | ||
| 4952 | (guix build utils) | ||
| 4953 | (ice-9 match)) | ||
| 4954 | #:phases | ||
| 4955 | #~(modify-phases %standard-phases | ||
| 4956 | (add-after 'install 'install-completions | ||
| 4957 | (lambda* (#:key native-inputs #:allow-other-keys) | ||
| 4958 | (for-each | ||
| 4959 | (match-lambda | ||
| 4960 | ((shell . path) | ||
| 4961 | (mkdir-p (in-vicinity #$output (dirname path))) | ||
| 4962 | (let ((binary | ||
| 4963 | (if #$(%current-target-system) | ||
| 4964 | (search-input-file native-inputs "bin/rabbitmqadmin") | ||
| 4965 | (in-vicinity #$output "bin/rabbitmqadmin")))) | ||
| 4966 | (with-output-to-file (in-vicinity #$output path) | ||
| 4967 | (lambda _ | ||
| 4968 | (invoke binary "shell" "completions" "--shell" shell)))))) | ||
| 4969 | '(("bash" . "share/bash-completion/completions/rabbitmqadmin") | ||
| 4970 | ("elvish" . "share/elvish/lib/rabbitmqadmin") | ||
| 4971 | ("fish" . "share/fish/vendor_completions.d/rabbitmqadmin.fish") | ||
| 4972 | ("nushell" . "share/nushell/vendor/autoload/rabbitmqadmin") | ||
| 4973 | ("zsh" . "share/zsh/site-functions/_rabbitmqadmin")))))))) | ||
| 4949 | (inputs (cons* mimalloc (cargo-inputs 'rabbitmqadmin))) | 4974 | (inputs (cons* mimalloc (cargo-inputs 'rabbitmqadmin))) |
| 4975 | (native-inputs | ||
| 4976 | (if (%current-target-system) | ||
| 4977 | (list this-package) | ||
| 4978 | '())) | ||
| 4950 | (home-page "https://www.rabbitmq.com/docs/management-cli") | 4979 | (home-page "https://www.rabbitmq.com/docs/management-cli") |
| 4951 | (synopsis "Manage RabbitMQ broker via the management plugin") | 4980 | (synopsis "Manage RabbitMQ broker via the management plugin") |
| 4952 | (description | 4981 | (description |
