summary refs log tree commit diff
path: root/gnu/packages/guile.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-09-07 18:16:49 +0200
committerLudovic Courtès <ludo@gnu.org>2016-09-07 18:42:46 +0200
commit4b74a29d8fd1af870a2db19d554923263abb7657 (patch)
tree6e6bd1503942d392bfdf703e182f71d9e4e8147a /gnu/packages/guile.scm
parentfe447664d864f3d406862e9fba681c50edf04cfb (diff)
downloadguix-4b74a29d8fd1af870a2db19d554923263abb7657.tar.gz
gnu: guile-minikanren: Remove hard-coded Guile effective version.
* gnu/packages/guile.scm (guile-minikanren)[arguments]: Remove (ice-9
match) from #:modules.  Use 'open-pipe*' to determine the effective
version of Guile, and use that to compute MODULE-DIR.
Diffstat (limited to 'gnu/packages/guile.scm')
-rw-r--r--gnu/packages/guile.scm17
1 files changed, 12 insertions, 5 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 859e77a6e8..195af54c84 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -555,15 +555,22 @@ http:://json.org specification.  These are the main features:
                 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
     (build-system trivial-build-system)
     (arguments
-     `(#:modules
-       ((guix build utils)
-        (ice-9 match))
+     `(#:modules ((guix build utils))
        #:builder
        (begin
          (use-modules (guix build utils)
-                      (ice-9 match))
+                      (ice-9 match)
+                      (ice-9 popen)
+                      (ice-9 rdelim))
+
          (let* ((out (assoc-ref %outputs "out"))
-                (module-dir (string-append out "/share/guile/site/2.0"))
+                (guile (assoc-ref %build-inputs "guile"))
+                (effective (read-line
+                            (open-pipe* OPEN_READ
+                                        (string-append guile "/bin/guile")
+                                        "-c" "(display (effective-version))")))
+                (module-dir (string-append out "/share/guile/site/"
+                                           effective))
                 (source (assoc-ref %build-inputs "source"))
                 (doc (string-append out "/share/doc/guile-minikanren"))
                 (scm-files '("minikanren.scm"