guix-commits
[Top][All Lists]
Advanced

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

04/05: gnu: python-on-guile: Wrap with own Guile modules.


From: guix-commits
Subject: 04/05: gnu: python-on-guile: Wrap with own Guile modules.
Date: Tue, 23 Jun 2020 19:05:25 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit 862d6a9173bf57ffcb3698104b33cd7d1085a12b
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Wed Jun 24 00:17:28 2020 +0200

    gnu: python-on-guile: Wrap with own Guile modules.
    
    * gnu/packages/guile-xyz.scm (python-on-guile)[arguments]: Add the output
    modules to the wrapper.
---
 gnu/packages/guile-xyz.scm | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 19b5284..e7f4848 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2602,13 +2602,28 @@ serializing continuations or delimited continuations.")
          (add-after 'install 'wrap
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Wrap the 'python' executable so it can find its
-             ;; dependencies.
-             (let ((out  (assoc-ref outputs "out")))
+             ;; dependencies and own modules.
+             (let* ((out (assoc-ref outputs "out"))
+                    (guile-version ,(version-major+minor
+                                     (package-version guile-3.0)))
+                    (scm (string-append out "/share/guile/site/"
+                                        guile-version))
+                    (ccache (string-append out "/lib/guile/" guile-version
+                                           "/site-ccache"))
+                    (load-path (string-join
+                                (cons scm
+                                      ;; XXX: cdr because we augment it above.
+                                      (cdr (string-split
+                                            (getenv "GUILE_LOAD_PATH") #\:)))
+                                ":"))
+                    (compiled-path (string-append
+                                    ccache ":"
+                                    (getenv "GUILE_LOAD_COMPILED_PATH"))))
                (wrap-program (string-append out "/bin/python")
                  `("GUILE_LOAD_PATH" ":" prefix
-                   (,(getenv "GUILE_LOAD_PATH")))
+                   (,load-path))
                  `("GUILE_LOAD_COMPILED_PATH" ":" prefix
-                   (,(getenv "GUILE_LOAD_COMPILED_PATH"))))
+                   (,compiled-path)))
                #t))))))
     (inputs
      `(("guile" ,guile-3.0)))



reply via email to

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