summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-01-23 11:07:46 +0100
committerLudovic Courtès <ludo@gnu.org>2020-01-23 11:26:55 +0100
commit675f1940e92eeccf45cc222845077b72bab7593b (patch)
tree581d07ca028e6ae9b0cd1b517f3bdfd53d8703d1
parent3de0d20b80248179f03ee54091c05c8896df1763 (diff)
downloadguix-675f1940e92eeccf45cc222845077b72bab7593b.tar.gz
gnu: guile-lib: Add "guile3.0-lib" variant.
* gnu/packages/guile-xyz.scm (guile-lib)[source]: Add 'modules' and
'snippet'.
(guile3.0-lib): New variable.
-rw-r--r--gnu/packages/guile-xyz.scm19
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c3c48456fb..029054b90e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1814,7 +1814,18 @@ library.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))))
+                "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Work around miscompilation on Guile 3.0.0 at -O2:
+                  ;; <https://bugs.gnu.org/39251>.
+                  (substitute* "src/md5.scm"
+                    (("\\(define f-ash ash\\)")
+                     "(define f-ash (@ (guile) ash))\n")
+                    (("\\(define f-add \\+\\)")
+                     "(define f-add (@ (guile) +))\n"))
+                  #t))))
     (build-system gnu-build-system)
     (arguments
      '(#:make-flags
@@ -1851,6 +1862,12 @@ for Guile\".")
     (name "guile2.0-lib")
     (inputs `(("guile" ,guile-2.0)))))
 
+(define-public guile3.0-lib
+  (package
+    (inherit guile-lib)
+    (name "guile3.0-lib")
+    (inputs `(("guile" ,guile-3.0)))))
+
 (define-public guile-minikanren
   (package
     (name "guile-minikanren")