summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-10-08 16:34:53 +0200
committerLudovic Courtès <ludo@gnu.org>2016-10-09 23:23:11 +0200
commit92b725829bb8597a5828f1892812aa32620203c9 (patch)
treec428fc0e6b4b77197e65273d96442f0b6ecff939 /gnu
parent8a8f6590ec90fcade622cb53a921d60af469d988 (diff)
gnu: guile-ssh: Compile .scm files after patching them.
Before this commit, the .go files were obtained by compiling the unpatched .scm files, so they would refer to libguile-ssh without its absolute file name. * gnu/packages/ssh.scm (guile-ssh)[arguments]: Move 'fix-libguile-ssh-file-name' before 'build'. Have it run "make install -C libguile-ssh" first.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/ssh.scm28
1 files changed, 14 insertions, 14 deletions
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 02e8c93126f..c2444fef4aa 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -228,21 +228,21 @@ Additionally, various channel-specific options can be negotiated.")
228 (lambda* (#:key inputs #:allow-other-keys) 228 (lambda* (#:key inputs #:allow-other-keys)
229 (chmod "doc/version.texi" #o777) ;make it writable 229 (chmod "doc/version.texi" #o777) ;make it writable
230 (zero? (system* "autoreconf" "-vfi")))) 230 (zero? (system* "autoreconf" "-vfi"))))
231 (add-after 'install 'fix-libguile-ssh-file-name 231 (add-before 'build 'fix-libguile-ssh-file-name
232 (lambda* (#:key outputs #:allow-other-keys) 232 (lambda* (#:key outputs #:allow-other-keys)
233 (let* ((out (assoc-ref outputs "out")) 233 ;; Build and install libguile-ssh.so so that we can use
234 (libdir (string-append out "/lib")) 234 ;; its absolute file name in .scm files, before we build
235 (guiledir (string-append out 235 ;; the .go files.
236 "/share/guile/site/2.0"))) 236 (and (zero? (system* "make" "install"
237 (substitute* (find-files guiledir ".scm") 237 "-C" "libguile-ssh"
238 (("\"libguile-ssh\"") 238 "-j" (number->string
239 (string-append "\"" libdir "/libguile-ssh\""))) 239 (parallel-job-count))))
240 240 (let* ((out (assoc-ref outputs "out"))
241 ;; Make sure it works. 241 (libdir (string-append out "/lib")))
242 (setenv "GUILE_LOAD_PATH" guiledir) 242 (substitute* (find-files "." "\\.scm$")
243 (setenv "GUILE_LOAD_COMPILED_PATH" guiledir) 243 (("\"libguile-ssh\"")
244 (zero? 244 (string-append "\"" libdir "/libguile-ssh\"")))
245 (system* "guile" "-c" "(use-modules (ssh session))")))))) 245 #t)))))
246 #:configure-flags (list (string-append "--with-guilesitedir=" 246 #:configure-flags (list (string-append "--with-guilesitedir="
247 (assoc-ref %outputs "out") 247 (assoc-ref %outputs "out")
248 "/share/guile/site/2.0")) 248 "/share/guile/site/2.0"))