diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2026-06-04 13:31:52 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-06-04 13:31:52 +0300 |
| commit | d483d0a71062e146df664095f024e316d0338de1 (patch) | |
| tree | 4e2eeb1041fc0488852dd732d8e2ad296e2feb49 /gnu/packages | |
| parent | 731cb49b13045385875971eeba533ad7eae9fca4 (diff) | |
gnu: ouch: Update install-extras phase.
* gnu/packages/rust-apps.scm (ouch)[arguments]: Rewrite the phase
installing extras to use the copy-build-system's 'install phase.
Change-Id: Id41f46b126cb8c0750b856b185db0ee22fa8044c
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/rust-apps.scm | 71 |
1 files changed, 33 insertions, 38 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 3facb1c9934..1ce256c48b8 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm | |||
| @@ -2830,45 +2830,40 @@ performance and customizability.") | |||
| 2830 | ((".*bundled.*") "")))))) | 2830 | ((".*bundled.*") "")))))) |
| 2831 | (build-system cargo-build-system) | 2831 | (build-system cargo-build-system) |
| 2832 | (arguments | 2832 | (arguments |
| 2833 | `(#:install-source? #f | 2833 | (list |
| 2834 | #:install-source? #f | ||
| 2835 | #:imported-modules (append %copy-build-system-modules | ||
| 2836 | %cargo-build-system-modules) | ||
| 2837 | #:modules '((guix build cargo-build-system) | ||
| 2838 | ((guix build copy-build-system) #:prefix copy:) | ||
| 2839 | (guix build utils)) | ||
| 2834 | #:phases | 2840 | #:phases |
| 2835 | (modify-phases %standard-phases | 2841 | #~(modify-phases %standard-phases |
| 2836 | (add-before 'build 'pre-build | 2842 | (add-before 'build 'pre-build |
| 2837 | (lambda* (#:key inputs #:allow-other-keys) | 2843 | (lambda* (#:key inputs #:allow-other-keys) |
| 2838 | (setenv "OUCH_ARTIFACTS_FOLDER" "target") | 2844 | (setenv "OUCH_ARTIFACTS_FOLDER" "target") |
| 2839 | ;; Uses nonfree library. | 2845 | ;; Uses nonfree library. |
| 2840 | (invoke "cargo" "remove" "unrar") | 2846 | (invoke "cargo" "remove" "unrar") |
| 2841 | ;; Set the location for bzip3 | 2847 | ;; Set the location for bzip3 |
| 2842 | (setenv "BZIP3_LIB_DIR" | 2848 | (setenv "BZIP3_LIB_DIR" |
| 2843 | (dirname (search-input-file inputs "/lib/libbzip3.so"))) | 2849 | (dirname (search-input-file inputs "/lib/libbzip3.so"))) |
| 2844 | (setenv "BZIP3_INCLUDE_DIR" | 2850 | (setenv "BZIP3_INCLUDE_DIR" |
| 2845 | (dirname (search-input-file inputs "/include/libbz3.h"))))) | 2851 | (dirname (search-input-file inputs "/include/libbz3.h"))))) |
| 2846 | (add-after 'install 'install-extras | 2852 | (add-after 'install 'install-extras |
| 2847 | (lambda* (#:key outputs #:allow-other-keys) | 2853 | (lambda args |
| 2848 | (let* ((out (assoc-ref outputs "out")) | 2854 | (apply (assoc-ref copy:%standard-phases 'install) |
| 2849 | (share (string-append out "/share")) | 2855 | #:install-plan |
| 2850 | (bash-completions-dir | 2856 | '(("target/ouch.bash" |
| 2851 | (string-append out "/share/bash-completion/completions")) | 2857 | "share/bash-completion/completions/ouch") |
| 2852 | (zsh-completions-dir | 2858 | ("target/ouch.elv" |
| 2853 | (string-append share "/zsh/site-functions")) | 2859 | "share/elvish/lib/ouch") |
| 2854 | (fish-completions-dir | 2860 | ("target/ouch.fish" |
| 2855 | (string-append share "/fish/vendor_completions.d")) | 2861 | "share/fish/vendor_completions.d/") |
| 2856 | (elvish-completions-dir | 2862 | ("target/_ouch" |
| 2857 | (string-append share "/elvish/lib")) | 2863 | "share/zsh/site-functions/") |
| 2858 | (man1 (string-append share "/man/man1"))) | 2864 | ("target/" "share/man/man1/" |
| 2859 | (mkdir-p bash-completions-dir) | 2865 | #:include-regexp ("\\.1$"))) |
| 2860 | (mkdir-p elvish-completions-dir) | 2866 | args)))))) |
| 2861 | (copy-file "target/ouch.bash" | ||
| 2862 | (string-append bash-completions-dir "/ouch")) | ||
| 2863 | (install-file "target/_ouch" | ||
| 2864 | (string-append zsh-completions-dir "/_ouch")) | ||
| 2865 | (install-file "target/ouch.fish" | ||
| 2866 | fish-completions-dir) | ||
| 2867 | (copy-file "target/ouch.elv" | ||
| 2868 | (string-append elvish-completions-dir "/ouch")) | ||
| 2869 | (for-each (lambda (manpage) | ||
| 2870 | (install-file manpage man1)) | ||
| 2871 | (find-files "target" "\\.1$")))))))) | ||
| 2872 | (native-inputs (list git-minimal/pinned pkg-config)) | 2867 | (native-inputs (list git-minimal/pinned pkg-config)) |
| 2873 | (inputs (cons* bzip2 bzip3-1.4 clang xz zlib `(,zstd "lib") | 2868 | (inputs (cons* bzip2 bzip3-1.4 clang xz zlib `(,zstd "lib") |
| 2874 | (cargo-inputs 'ouch))) | 2869 | (cargo-inputs 'ouch))) |
