diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2026-02-23 11:16:14 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-02-23 11:16:14 +0200 |
| commit | be4916939f912c8e5c946307570d8f413497439c (patch) | |
| tree | 8c269180cf7b5a0d26e2d48efe0da469ab999029 /gnu | |
| parent | 63b892c1776cc29b9400c441c968bd8f6af3ab91 (diff) | |
gnu: bat: Rewrite install-extras phase.
* gnu/packages/rust-apps.scm (bat)[arguments]: Rewrite the
'install-extras phase to use the copy-build-system 'install phase.
Change-Id: I77de03e0d026ac02173f244a0b897474ee839e89
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/rust-apps.scm | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 11177302ad0..b6f12432b93 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm | |||
| @@ -65,6 +65,7 @@ | |||
| 65 | 65 | ||
| 66 | (define-module (gnu packages rust-apps) | 66 | (define-module (gnu packages rust-apps) |
| 67 | #:use-module (guix build-system cargo) | 67 | #:use-module (guix build-system cargo) |
| 68 | #:use-module (guix build-system copy) | ||
| 68 | #:use-module (guix build-system glib-or-gtk) | 69 | #:use-module (guix build-system glib-or-gtk) |
| 69 | #:use-module (guix build-system meson) | 70 | #:use-module (guix build-system meson) |
| 70 | #:use-module (guix build-system pyproject) | 71 | #:use-module (guix build-system pyproject) |
| @@ -271,32 +272,28 @@ alternative zones.") | |||
| 271 | (arguments | 272 | (arguments |
| 272 | (list | 273 | (list |
| 273 | #:install-source? #f | 274 | #:install-source? #f |
| 275 | #:imported-modules (append %copy-build-system-modules | ||
| 276 | %cargo-build-system-modules) | ||
| 277 | #:modules '((guix build cargo-build-system) | ||
| 278 | ((guix build copy-build-system) #:prefix copy:) | ||
| 279 | (guix build utils)) | ||
| 274 | #:phases | 280 | #:phases |
| 275 | #~(modify-phases %standard-phases | 281 | #~(modify-phases %standard-phases |
| 276 | (add-before 'build 'pre-build | 282 | (add-before 'build 'pre-build |
| 277 | (lambda _ | 283 | (lambda _ |
| 278 | (setenv "BAT_ASSETS_GEN_DIR" (string-append (getcwd) "/target")))) | 284 | (setenv "BAT_ASSETS_GEN_DIR" (string-append (getcwd) "/target")))) |
| 279 | (add-after 'install 'install-extras | 285 | (add-after 'install 'install-extras |
| 280 | (lambda* (#:key outputs #:allow-other-keys) | 286 | (lambda args |
| 281 | (let* ((out (assoc-ref outputs "out")) | 287 | (apply (assoc-ref copy:%standard-phases 'install) |
| 282 | (share (string-append out "/share")) | 288 | #:install-plan |
| 283 | (bash-completions-dir | 289 | '(("target/assets/completions/bat.bash" |
| 284 | (string-append share "/bash-completion/completions")) | 290 | "share/bash-completion/completions/bat") |
| 285 | (zsh-completions-dir | 291 | ("target/assets/completions/bat.fish" |
| 286 | (string-append share "/zsh/site-functions")) | 292 | "share/fish/vendor_completions.d/") |
| 287 | (fish-completions-dir | 293 | ("target/assets/completions/bat.zsh" |
| 288 | (string-append share "/fish/vendor_completions.d")) | 294 | "share/zsh/site-functions/_bat") |
| 289 | (man1 (string-append share "/man/man1"))) | 295 | ("target/assets/manual/bat.1" "share/man/man1/")) |
| 290 | (mkdir-p bash-completions-dir) | 296 | args)))))) |
| 291 | (mkdir-p zsh-completions-dir) | ||
| 292 | (mkdir-p fish-completions-dir) | ||
| 293 | (copy-file "target/assets/completions/bat.bash" | ||
| 294 | (string-append bash-completions-dir "/bat")) | ||
| 295 | (copy-file "target/assets/completions/bat.zsh" | ||
| 296 | (string-append zsh-completions-dir "/_bat")) | ||
| 297 | (install-file "target/assets/completions/bat.fish" | ||
| 298 | fish-completions-dir) | ||
| 299 | (install-file "target/assets/manual/bat.1" man1))))))) | ||
| 300 | (native-inputs (list pkg-config)) | 297 | (native-inputs (list pkg-config)) |
| 301 | (inputs (cons* libgit2-1.9 oniguruma zlib (cargo-inputs 'bat))) | 298 | (inputs (cons* libgit2-1.9 oniguruma zlib (cargo-inputs 'bat))) |
| 302 | (home-page "https://github.com/sharkdp/bat") | 299 | (home-page "https://github.com/sharkdp/bat") |
