diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2026-05-17 15:35:45 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-05-17 16:38:55 +0300 |
| commit | e440725e7ca2dbcff6292583e329a073192c1ecb (patch) | |
| tree | 1a1e3c1634a45c9a70f521eddaf2595430762559 /gnu | |
| parent | 29e8804f174c6d82da742e76519a2b3e9c82d02f (diff) | |
gnu: lsd: Simplify installing extras.
* gnu/packages/rust-apps.scm (lsd)[arguments]: Rewrite the phase
installing extras to use the copy-build-system's 'install phase.
Change-Id: I5732eb3d7b400bb05f14bbdc76e68cee5bcd0c9b
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/rust-apps.scm | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 2a33e08ac4c..b76006de483 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm | |||
| @@ -2352,28 +2352,29 @@ more.") | |||
| 2352 | (base32 "0r1nbw4ljl4654kjw1vszf4gsp0cc1s3bp2y2azml988r740vl8s")))) | 2352 | (base32 "0r1nbw4ljl4654kjw1vszf4gsp0cc1s3bp2y2azml988r740vl8s")))) |
| 2353 | (build-system cargo-build-system) | 2353 | (build-system cargo-build-system) |
| 2354 | (arguments | 2354 | (arguments |
| 2355 | `(#:install-source? #f | 2355 | (list |
| 2356 | #:phases | 2356 | #:install-source? #f |
| 2357 | (modify-phases %standard-phases | 2357 | #:imported-modules (append %copy-build-system-modules |
| 2358 | (add-after 'unpack 'set-shell-completion-dir | 2358 | %cargo-build-system-modules) |
| 2359 | (lambda _ | 2359 | #:modules '((guix build cargo-build-system) |
| 2360 | (setenv "SHELL_COMPLETIONS_DIR" "target/assets"))) | 2360 | ((guix build copy-build-system) #:prefix copy:) |
| 2361 | (add-after 'install 'install-more | 2361 | (guix build utils)) |
| 2362 | (lambda* (#:key outputs #:allow-other-keys) | 2362 | #:phases |
| 2363 | (let* ((out (assoc-ref outputs "out")) | 2363 | #~(modify-phases %standard-phases |
| 2364 | (share (string-append out "/share")) | 2364 | (add-before 'build 'pre-build |
| 2365 | (bash-completions-dir | 2365 | (lambda _ |
| 2366 | (string-append out "/etc/bash_completion.d")) | 2366 | (setenv "SHELL_COMPLETIONS_DIR" "target/assets"))) |
| 2367 | (zsh-completions-dir | 2367 | (add-after 'install 'install-extras |
| 2368 | (string-append share "/zsh/site-functions")) | 2368 | (lambda args |
| 2369 | (fish-completions-dir | 2369 | (apply (assoc-ref copy:%standard-phases 'install) |
| 2370 | (string-append share "/fish/vendor_completions.d"))) | 2370 | #:install-plan |
| 2371 | ;; The completions are generated in build.rs. | 2371 | '(("target/assets/lsd.bash" |
| 2372 | (install-file "target/assets/_lsd" zsh-completions-dir) | 2372 | "share/bash-completion/completions/lsd") |
| 2373 | (install-file "target/assets/lsd.fish" fish-completions-dir) | 2373 | ("target/assets/lsd.fish" |
| 2374 | (mkdir-p bash-completions-dir) | 2374 | "share/fish/vendor_completions.d/") |
| 2375 | (copy-file "target/assets/lsd.bash" | 2375 | ("target/assets/_lsd" |
| 2376 | (string-append bash-completions-dir "/lsd")))))))) | 2376 | "share/zsh/site-functions/")) |
| 2377 | args)))))) | ||
| 2377 | (native-inputs (list pkg-config | 2378 | (native-inputs (list pkg-config |
| 2378 | ;; for tests | 2379 | ;; for tests |
| 2379 | git-minimal)) | 2380 | git-minimal)) |
