guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: guile-ssh: Compile .scm files after patching them.


From: Ludovic Courtès
Subject: 02/03: gnu: guile-ssh: Compile .scm files after patching them.
Date: Sun, 9 Oct 2016 21:25:14 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 92b725829bb8597a5828f1892812aa32620203c9
Author: Ludovic Courtès <address@hidden>
Date:   Sat Oct 8 16:34:53 2016 +0200

    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.
---
 gnu/packages/ssh.scm |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 02e8c93..c2444fe 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -228,21 +228,21 @@ Additionally, various channel-specific options can be 
negotiated.")
                     (lambda* (#:key inputs #:allow-other-keys)
                       (chmod "doc/version.texi" #o777) ;make it writable
                       (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)
-                      (let* ((out      (assoc-ref outputs "out"))
-                             (libdir   (string-append out "/lib"))
-                             (guiledir (string-append out
-                                                      
"/share/guile/site/2.0")))
-                        (substitute* (find-files guiledir ".scm")
-                          (("\"libguile-ssh\"")
-                           (string-append "\"" libdir "/libguile-ssh\"")))
-
-                        ;; Make sure it works.
-                        (setenv "GUILE_LOAD_PATH" guiledir)
-                        (setenv "GUILE_LOAD_COMPILED_PATH" guiledir)
-                        (zero?
-                         (system* "guile" "-c" "(use-modules (ssh 
session))"))))))
+                      ;; Build and install libguile-ssh.so so that we can use
+                      ;; its absolute file name in .scm files, before we build
+                      ;; the .go files.
+                      (and (zero? (system* "make" "install"
+                                           "-C" "libguile-ssh"
+                                           "-j" (number->string
+                                                 (parallel-job-count))))
+                           (let* ((out      (assoc-ref outputs "out"))
+                                  (libdir   (string-append out "/lib")))
+                             (substitute* (find-files "." "\\.scm$")
+                               (("\"libguile-ssh\"")
+                                (string-append "\"" libdir "/libguile-ssh\"")))
+                             #t)))))
        #:configure-flags (list (string-append "--with-guilesitedir="
                                               (assoc-ref %outputs "out")
                                               "/share/guile/site/2.0"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]