mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
gnu: wgetpaste: Make all dependencies explicit.
* gnu/packages/wget.scm (wgetpaste)[arguments]: Replace limited ‘use-inputs’ phase with a ‘wrap-program’ one.
This commit is contained in:
parent
4d3990c9f3
commit
c8e214e80d
1 changed files with 17 additions and 8 deletions
|
@ -89,17 +89,13 @@ (define-public wgetpaste
|
|||
"1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:phases
|
||||
'(#:modules ((guix build gnu-build-system)
|
||||
(guix build utils)
|
||||
(srfi srfi-1))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(delete 'build)
|
||||
(add-before 'install 'use-inputs
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let* ((wget (assoc-ref inputs "wget")))
|
||||
(substitute* "wgetpaste"
|
||||
(("(LC_ALL=C) wget" _ prefix)
|
||||
(format "~a ~a/bin/wget" prefix wget)))
|
||||
#t)))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
|
@ -107,6 +103,19 @@ (define-public wgetpaste
|
|||
(zsh (string-append out "/share/zsh/site-functions")))
|
||||
(install-file "wgetpaste" bin)
|
||||
(install-file "_wgetpaste" zsh)
|
||||
#t)))
|
||||
(add-after 'install 'wrap-program
|
||||
;; /bin/wgetpaste prides itself on relying only on the following
|
||||
;; inputs, and doesn't need to execute arbitrary commands, so
|
||||
;; override PATH completely to detect any new dependencies early.
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(wrap-program (string-append out "/bin/wgetpaste")
|
||||
`("PATH" ":" =
|
||||
,(delete-duplicates
|
||||
(map (lambda (command) (dirname (which command)))
|
||||
(list "bash" "mktemp" "sed" "sort" "tee" "tr"
|
||||
"wget")))))
|
||||
#t))))
|
||||
#:tests? #f)) ; no test target
|
||||
(inputs
|
||||
|
|
Loading…
Reference in a new issue