guix-commits
[Top][All Lists]
Advanced

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

10/11: gnu: guile-present: Pass the right module directories in scripts.


From: guix-commits
Subject: 10/11: gnu: guile-present: Pass the right module directories in scripts.
Date: Thu, 23 Jan 2020 05:28:10 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 897186c1554e18a187429683d2eafdbfc0caac96
Author: Ludovic Courtès <address@hidden>
AuthorDate: Thu Jan 23 11:22:20 2020 +0100

    gnu: guile-present: Pass the right module directories in scripts.
    
    * gnu/packages/gtk.scm (guile-present)[arguments]: In 'post-install'
    phase, remove hard-coded "2.0" and replace it by a computed effective
    version.  Also, pass "/site-ccache" to -C.
---
 gnu/packages/gtk.scm | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 6b61e9c..88c4b56 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -84,7 +84,8 @@
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26))
+  #:use-module (srfi srfi-26)
+  #:use-module (ice-9 match))
 
 (define-public atk
   (package
@@ -956,18 +957,22 @@ images onto Cairo surfaces.")
                   #t))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'install 'post-install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out   (assoc-ref outputs "out"))
                     (bin   (string-append out "/bin"))
-                    (guile (assoc-ref inputs "guile")))
+                    (guile (assoc-ref inputs "guile"))
+                    (version
+                     ,(match (assoc "guile" (package-inputs this-package))
+                        (("guile" guile)
+                         (version-major+minor (package-version guile))))))
                (substitute* (find-files bin ".*")
                  (("guile")
                   (string-append guile "/bin/guile -L "
-                                 out "/share/guile/site/2.0 -C "
-                                 out "/share/guile/site/2.0 "))))
+                                 out "/share/guile/site/" version " -C "
+                                 out "/lib/guile/" version "/site-ccache "))))
              #t)))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("guile" ,guile-2.2)))



reply via email to

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