mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 06:36:37 -05:00
gnu: rbw: Install scripts.
* gnu/packages/rust-apps.scm (rbw)[outputs]: Add scripts output. [arguments]: Add a phase to install the scripts and wrap them. [inputs]: Add coreutils-minimal, findutils, grep, perl, sed. Change-Id: I99c6ddc67c50498cb3a2700cdfb4e3651ac17739
This commit is contained in:
parent
1b0adb6ae9
commit
d7c40f0572
1 changed files with 23 additions and 1 deletions
|
@ -1999,6 +1999,7 @@ (define-public rbw
|
|||
(package
|
||||
(name "rbw")
|
||||
(version "1.8.3")
|
||||
(outputs '("out" "scripts"))
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
@ -2083,11 +2084,32 @@ (define-public rbw
|
|||
(mkdir-p (string-append share "/elvish/lib"))
|
||||
(with-output-to-file
|
||||
(string-append share "/elvish/lib/rbw")
|
||||
(lambda _ (invoke rbw "gen-completions" "elvish")))))))))
|
||||
(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")))
|
||||
(for-each (lambda (file)
|
||||
(install-file file (string-append 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")
|
||||
,(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")))))))))
|
||||
(native-inputs
|
||||
(cons* perl (if (%current-target-system)
|
||||
(list this-package)
|
||||
'())))
|
||||
(inputs
|
||||
(list coreutils-minimal findutils grep perl sed))
|
||||
(home-page "https://git.tozt.net/rbw")
|
||||
(synopsis "Unofficial Bitwarden CLI")
|
||||
(description "This package is an unofficial command line client for
|
||||
|
|
Loading…
Reference in a new issue