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.
This commit is contained in:
parent
8a8f6590ec
commit
92b725829b
|
@ -228,21 +228,21 @@ Additionally, various channel-specific options can be negotiated.")
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(chmod "doc/version.texi" #o777) ;make it writable
|
(chmod "doc/version.texi" #o777) ;make it writable
|
||||||
(zero? (system* "autoreconf" "-vfi"))))
|
(zero? (system* "autoreconf" "-vfi"))))
|
||||||
(add-after 'install 'fix-libguile-ssh-file-name
|
(add-before 'build 'fix-libguile-ssh-file-name
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
;; Build and install libguile-ssh.so so that we can use
|
||||||
(libdir (string-append out "/lib"))
|
;; its absolute file name in .scm files, before we build
|
||||||
(guiledir (string-append out
|
;; the .go files.
|
||||||
"/share/guile/site/2.0")))
|
(and (zero? (system* "make" "install"
|
||||||
(substitute* (find-files guiledir ".scm")
|
"-C" "libguile-ssh"
|
||||||
(("\"libguile-ssh\"")
|
"-j" (number->string
|
||||||
(string-append "\"" libdir "/libguile-ssh\"")))
|
(parallel-job-count))))
|
||||||
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
;; Make sure it works.
|
(libdir (string-append out "/lib")))
|
||||||
(setenv "GUILE_LOAD_PATH" guiledir)
|
(substitute* (find-files "." "\\.scm$")
|
||||||
(setenv "GUILE_LOAD_COMPILED_PATH" guiledir)
|
(("\"libguile-ssh\"")
|
||||||
(zero?
|
(string-append "\"" libdir "/libguile-ssh\"")))
|
||||||
(system* "guile" "-c" "(use-modules (ssh session))"))))))
|
#t)))))
|
||||||
#:configure-flags (list (string-append "--with-guilesitedir="
|
#:configure-flags (list (string-append "--with-guilesitedir="
|
||||||
(assoc-ref %outputs "out")
|
(assoc-ref %outputs "out")
|
||||||
"/share/guile/site/2.0"))
|
"/share/guile/site/2.0"))
|
||||||
|
|
Loading…
Reference in New Issue