mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: rbw: Rewrite with g-exps.
* gnu/packages/rust-apps.scm (rbw)[arguments]: Rewrite using g-exps. Change-Id: I82a959f4fb750e1275a6088c6e3fe4296ec4f1f0
This commit is contained in:
@@ -3690,51 +3690,49 @@ runs a command whenever it detects modifications.")
|
||||
(base32 "1fg9jad5r255xcnc22ldmjra9ydf40yqvmpa7pwrzxncvf37v3l9"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:install-source? #f
|
||||
(list
|
||||
#:install-source? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'install 'install-completions
|
||||
(lambda* (#:key native-inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(share (string-append out "/share"))
|
||||
(rbw (if ,(%current-target-system)
|
||||
(search-input-file native-inputs "/bin/rbw")
|
||||
(string-append out "/bin/rbw"))))
|
||||
(mkdir-p (string-append out "/etc/bash_completion.d"))
|
||||
(with-output-to-file
|
||||
(string-append out "/etc/bash_completion.d/rbw")
|
||||
(lambda _ (invoke rbw "gen-completions" "bash")))
|
||||
(mkdir-p (string-append share "/fish/vendor_completions.d"))
|
||||
(with-output-to-file
|
||||
(string-append share "/fish/vendor_completions.d/rbw.fish")
|
||||
(lambda _ (invoke rbw "gen-completions" "fish")))
|
||||
(mkdir-p (string-append share "/zsh/site-functions"))
|
||||
(with-output-to-file
|
||||
(string-append share "/zsh/site-functions/_rbw")
|
||||
(lambda _ (invoke rbw "gen-completions" "zsh")))
|
||||
(mkdir-p (string-append share "/elvish/lib"))
|
||||
(with-output-to-file
|
||||
(string-append share "/elvish/lib/rbw")
|
||||
(lambda _ (invoke rbw "gen-completions" "elvish"))))))
|
||||
(add-after 'install 'install-scripts
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(scripts (assoc-ref outputs "scripts")))
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'install 'install-completions
|
||||
(lambda* (#:key native-inputs #:allow-other-keys)
|
||||
(let ((share (string-append #$output "/share"))
|
||||
(rbw (if #$(%current-target-system)
|
||||
(search-input-file native-inputs "/bin/rbw")
|
||||
(string-append #$output "/bin/rbw"))))
|
||||
(mkdir-p (string-append #$output "/etc/bash_completion.d"))
|
||||
(with-output-to-file
|
||||
(string-append #$output "/etc/bash_completion.d/rbw")
|
||||
(lambda _ (invoke rbw "gen-completions" "bash")))
|
||||
(mkdir-p (string-append share "/fish/vendor_completions.d"))
|
||||
(with-output-to-file
|
||||
(string-append share "/fish/vendor_completions.d/rbw.fish")
|
||||
(lambda _ (invoke rbw "gen-completions" "fish")))
|
||||
(mkdir-p (string-append share "/zsh/site-functions"))
|
||||
(with-output-to-file
|
||||
(string-append share "/zsh/site-functions/_rbw")
|
||||
(lambda _ (invoke rbw "gen-completions" "zsh")))
|
||||
(mkdir-p (string-append share "/elvish/lib"))
|
||||
(with-output-to-file
|
||||
(string-append share "/elvish/lib/rbw")
|
||||
(lambda _ (invoke rbw "gen-completions" "elvish"))))))
|
||||
(add-after 'install 'install-scripts
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(for-each (lambda (file)
|
||||
(install-file file (string-append scripts "/bin")))
|
||||
(install-file file (string-append #$output:scripts "/bin")))
|
||||
(find-files "bin"))
|
||||
(for-each (lambda (file)
|
||||
(wrap-script file
|
||||
;; TODO: Do we want to wrap these with more programs?
|
||||
;; pass git fzf libsecret xclip rofi
|
||||
`("PATH" prefix
|
||||
(,(string-append out "/bin")
|
||||
(,(string-append #$output "/bin")
|
||||
,(dirname (search-input-file inputs "/bin/grep"))
|
||||
,(dirname (search-input-file inputs "/bin/sed"))
|
||||
,(dirname (search-input-file inputs "/bin/perl"))
|
||||
,(dirname (search-input-file inputs "/bin/xargs"))
|
||||
,(dirname (search-input-file inputs "/bin/sort"))))))
|
||||
(find-files (string-append scripts "/bin")))))))))
|
||||
(find-files (string-append #$output:scripts "/bin"))))))))
|
||||
(native-inputs
|
||||
(cons* perl (if (%current-target-system)
|
||||
(list this-package)
|
||||
|
||||
Reference in New Issue
Block a user