aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2019-06-03 18:50:58 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2019-08-21 23:52:47 +0200
commitd0d54a61d3c245d32f1de3427fe279a5de4ea9f1 (patch)
tree80d168b234d36b6b4687480a05d19bd4a7702e30 /gnu
parent35805bff9fabb749fc0bbe77b4ee4fc1bfe7e601 (diff)
downloadpatches-d0d54a61d3c245d32f1de3427fe279a5de4ea9f1.tar
patches-d0d54a61d3c245d32f1de3427fe279a5de4ea9f1.tar.gz
gnu: lsyncd: Search $PATH for binaries.
* gnu/packages/sync.scm (lsyncd)[arguments]: Add ‘search-$PATH-for-binaries’ phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/sync.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index 1c80b7978e..ccebe40e9d 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -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"))