From d0d54a61d3c245d32f1de3427fe279a5de4ea9f1 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 3 Jun 2019 18:50:58 +0200 Subject: gnu: lsyncd: Search $PATH for binaries. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/sync.scm (lsyncd)[arguments]: Add ‘search-$PATH-for-binaries’ phase. --- gnu/packages/sync.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gnu/packages/sync.scm') 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")) -- cgit v1.2.3