gnu: lsyncd: Search $PATH for binaries.

* gnu/packages/sync.scm (lsyncd)[arguments]: Add
‘search-$PATH-for-binaries’ phase.
This commit is contained in:
Tobias Geerinckx-Rice 2019-06-03 18:50:58 +02:00
parent 35805bff9f
commit d0d54a61d3
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 13 additions and 1 deletions

View File

@ -183,8 +183,20 @@ their folder.
#:test-target "tests"
#:phases
(modify-phases %standard-phases
;; No install target.
(add-after 'unpack 'search-$PATH-for-binaries
;; lsyncd requires and hard-codes absolute file names to binaries.
;; Make it fall back to searching $PATH for relative file names.
(lambda _
(substitute* "lsyncd.c"
(("execv\\(") "execvp("))
(substitute* (list "lsyncd.lua"
"default-direct.lua"
"default-rsync.lua"
"default-rsyncssh.lua")
(("(|/usr)/bin/") ""))
#t))
(replace 'install
;; No install target.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))