diff options
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/rust-apps.scm | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index dd99ac631d3..6e746cbece2 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm | |||
| @@ -3690,51 +3690,49 @@ runs a command whenever it detects modifications.") | |||
| 3690 | (base32 "1fg9jad5r255xcnc22ldmjra9ydf40yqvmpa7pwrzxncvf37v3l9")))) | 3690 | (base32 "1fg9jad5r255xcnc22ldmjra9ydf40yqvmpa7pwrzxncvf37v3l9")))) |
| 3691 | (build-system cargo-build-system) | 3691 | (build-system cargo-build-system) |
| 3692 | (arguments | 3692 | (arguments |
| 3693 | `(#:install-source? #f | 3693 | (list |
| 3694 | #:install-source? #f | ||
| 3694 | #:phases | 3695 | #:phases |
| 3695 | (modify-phases %standard-phases | 3696 | #~(modify-phases %standard-phases |
| 3696 | (add-after 'install 'install-completions | 3697 | (add-after 'install 'install-completions |
| 3697 | (lambda* (#:key native-inputs outputs #:allow-other-keys) | 3698 | (lambda* (#:key native-inputs #:allow-other-keys) |
| 3698 | (let* ((out (assoc-ref outputs "out")) | 3699 | (let ((share (string-append #$output "/share")) |
| 3699 | (share (string-append out "/share")) | 3700 | (rbw (if #$(%current-target-system) |
| 3700 | (rbw (if ,(%current-target-system) | 3701 | (search-input-file native-inputs "/bin/rbw") |
| 3701 | (search-input-file native-inputs "/bin/rbw") | 3702 | (string-append #$output "/bin/rbw")))) |
| 3702 | (string-append out "/bin/rbw")))) | 3703 | (mkdir-p (string-append #$output "/etc/bash_completion.d")) |
| 3703 | (mkdir-p (string-append out "/etc/bash_completion.d")) | 3704 | (with-output-to-file |
| 3704 | (with-output-to-file | 3705 | (string-append #$output "/etc/bash_completion.d/rbw") |
| 3705 | (string-append out "/etc/bash_completion.d/rbw") | 3706 | (lambda _ (invoke rbw "gen-completions" "bash"))) |
| 3706 | (lambda _ (invoke rbw "gen-completions" "bash"))) | 3707 | (mkdir-p (string-append share "/fish/vendor_completions.d")) |
| 3707 | (mkdir-p (string-append share "/fish/vendor_completions.d")) | 3708 | (with-output-to-file |
| 3708 | (with-output-to-file | 3709 | (string-append share "/fish/vendor_completions.d/rbw.fish") |
| 3709 | (string-append share "/fish/vendor_completions.d/rbw.fish") | 3710 | (lambda _ (invoke rbw "gen-completions" "fish"))) |
| 3710 | (lambda _ (invoke rbw "gen-completions" "fish"))) | 3711 | (mkdir-p (string-append share "/zsh/site-functions")) |
| 3711 | (mkdir-p (string-append share "/zsh/site-functions")) | 3712 | (with-output-to-file |
| 3712 | (with-output-to-file | 3713 | (string-append share "/zsh/site-functions/_rbw") |
| 3713 | (string-append share "/zsh/site-functions/_rbw") | 3714 | (lambda _ (invoke rbw "gen-completions" "zsh"))) |
| 3714 | (lambda _ (invoke rbw "gen-completions" "zsh"))) | 3715 | (mkdir-p (string-append share "/elvish/lib")) |
| 3715 | (mkdir-p (string-append share "/elvish/lib")) | 3716 | (with-output-to-file |
| 3716 | (with-output-to-file | 3717 | (string-append share "/elvish/lib/rbw") |
| 3717 | (string-append share "/elvish/lib/rbw") | 3718 | (lambda _ (invoke rbw "gen-completions" "elvish")))))) |
| 3718 | (lambda _ (invoke rbw "gen-completions" "elvish")))))) | 3719 | (add-after 'install 'install-scripts |
| 3719 | (add-after 'install 'install-scripts | 3720 | (lambda* (#:key inputs #:allow-other-keys) |
| 3720 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 3721 | (let ((out (assoc-ref outputs "out")) | ||
| 3722 | (scripts (assoc-ref outputs "scripts"))) | ||
| 3723 | (for-each (lambda (file) | 3721 | (for-each (lambda (file) |
| 3724 | (install-file file (string-append scripts "/bin"))) | 3722 | (install-file file (string-append #$output:scripts "/bin"))) |
| 3725 | (find-files "bin")) | 3723 | (find-files "bin")) |
| 3726 | (for-each (lambda (file) | 3724 | (for-each (lambda (file) |
| 3727 | (wrap-script file | 3725 | (wrap-script file |
| 3728 | ;; TODO: Do we want to wrap these with more programs? | 3726 | ;; TODO: Do we want to wrap these with more programs? |
| 3729 | ;; pass git fzf libsecret xclip rofi | 3727 | ;; pass git fzf libsecret xclip rofi |
| 3730 | `("PATH" prefix | 3728 | `("PATH" prefix |
| 3731 | (,(string-append out "/bin") | 3729 | (,(string-append #$output "/bin") |
| 3732 | ,(dirname (search-input-file inputs "/bin/grep")) | 3730 | ,(dirname (search-input-file inputs "/bin/grep")) |
| 3733 | ,(dirname (search-input-file inputs "/bin/sed")) | 3731 | ,(dirname (search-input-file inputs "/bin/sed")) |
| 3734 | ,(dirname (search-input-file inputs "/bin/perl")) | 3732 | ,(dirname (search-input-file inputs "/bin/perl")) |
| 3735 | ,(dirname (search-input-file inputs "/bin/xargs")) | 3733 | ,(dirname (search-input-file inputs "/bin/xargs")) |
| 3736 | ,(dirname (search-input-file inputs "/bin/sort")))))) | 3734 | ,(dirname (search-input-file inputs "/bin/sort")))))) |
| 3737 | (find-files (string-append scripts "/bin"))))))))) | 3735 | (find-files (string-append #$output:scripts "/bin")))))))) |
| 3738 | (native-inputs | 3736 | (native-inputs |
| 3739 | (cons* perl (if (%current-target-system) | 3737 | (cons* perl (if (%current-target-system) |
| 3740 | (list this-package) | 3738 | (list this-package) |
