gnu: lsh: 'lsh-authorize' uses the absolute file name of 'sexp-conv'.

Fixes <http://bugs.gnu.org/21516>.
Reported by Andreas Enge <andreas@enge.fr>.

* gnu/packages/lsh.scm (lsh)[arguments]: In 'pre-configure' phase,
  change 'src/lsh-authorize' to use the absolute file name of
  'sexp-conv'.
This commit is contained in:
Ludovic Courtès 2015-09-28 21:58:26 +02:00
parent 30d9aa5422
commit 0b1f0d36b1
1 changed files with 12 additions and 7 deletions

View File

@ -116,14 +116,19 @@ basis for almost any application.")
(alist-cons-before (alist-cons-before
'configure 'pre-configure 'configure 'pre-configure
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place by (let* ((nettle (assoc-ref inputs "nettle"))
;; default. (sexp-conv (string-append nettle "/bin/sexp-conv")))
(substitute* "src/environ.h.in" ;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place
(("^#define PATH_SEXP_CONV.*") ;; by default.
(let* ((nettle (assoc-ref inputs "nettle")) (substitute* "src/environ.h.in"
(sexp-conv (string-append nettle "/bin/sexp-conv"))) (("^#define PATH_SEXP_CONV.*")
(string-append "#define PATH_SEXP_CONV \"" (string-append "#define PATH_SEXP_CONV \""
sexp-conv "\"\n")))) sexp-conv "\"\n")))
;; Same for the 'lsh-authorize' script.
(substitute* "src/lsh-authorize"
(("=sexp-conv")
(string-append "=" sexp-conv))))
;; Tests rely on $USER being set. ;; Tests rely on $USER being set.
(setenv "USER" "guix")) (setenv "USER" "guix"))