guix-commits
[Top][All Lists]
Advanced

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

branch master updated: website: Use "guile" package from the latest Guix


From: Mathieu Othacehe
Subject: branch master updated: website: Use "guile" package from the latest Guix.
Date: Wed, 24 Jun 2020 13:49:38 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix-artwork.

The following commit(s) were added to refs/heads/master by this push:
     new c2b531a  website: Use "guile" package from the latest Guix.
c2b531a is described below

commit c2b531a1e110402df97de5e5f95b4a49767bb02d
Author: Mathieu Othacehe <m.othacehe@gmail.com>
AuthorDate: Wed Jun 24 19:41:58 2020 +0200

    website: Use "guile" package from the latest Guix.
    
    * website/.guix.scm (inferior-package): New procedure,
    (latest-guile): new variable,
    (haunt-with-latest-guile): renamed from haunt-with-guile-3.0.3, also use
    "inferior-package" to make sure to use the same Guile as the one of latest
    Guix,
    (build): adapt accordingly.
---
 website/.guix.scm | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/website/.guix.scm b/website/.guix.scm
index 3045c21..060172f 100644
--- a/website/.guix.scm
+++ b/website/.guix.scm
@@ -24,6 +24,7 @@
              (guix modules)
              (guix git-download)
              (guix gexp)
+             (guix inferior)
              (guix channels)
              (srfi srfi-1)
              (srfi srfi-9)
@@ -60,15 +61,22 @@
   ;; build the latest package list.
   (latest-channels %default-channels))
 
-;; Remove on the next rebuild cycle when Haunt will be built with Guile
-;; 3.0.3. Until then, this is needed to avoid a discrepancy when running Haunt
-;; with Guile 3.0.2 but loading Guix modules built for Guile 3.0.3.
-(define haunt-with-guile-3.0.3
+(define (inferior-package spec)
+  (first (lookup-inferior-packages
+          (inferior-for-channels
+           (latest-channels-channels latest-guix))
+          spec)))
+
+;; Make sure that Haunt uses the same Guile as the one from
+;; "latest-guix". Otherwise there could be a mismatch between the Guile
+;; revision used by Haunt and the one from the latest Guix modules used by
+;; Haunt.
+(define haunt-with-latest-guile
   (package
     (inherit haunt)
     (inputs
-     `(("guile" ,guile-3.0/libgc-7)
-       ,@(alist-delete "guile" (package-inputs haunt))))))
+     `(("guile" ,(inferior-package "guile"))
+       ,@(package-inputs haunt)))))
 
 (define build
   ;; We need Guile-JSON for 'packages-json-builder'.
@@ -119,7 +127,7 @@
           (setenv "XDG_CACHE_HOME" "/tmp/.cache")
 
           (format #t "Running 'haunt build'...~%")
-          (invoke #+(file-append haunt-with-guile-3.0.3 "/bin/haunt")
+          (invoke #+(file-append haunt-with-latest-guile "/bin/haunt")
                   "build")
 
           (mkdir-p #$output)
@@ -128,7 +136,7 @@
           (symlink "guix.html" (string-append #$output "/index.html"))))))
 
 (computed-file "guix-web-site" build
-               #:guile guile-3.0/libgc-7
+               #:guile (specification->package "guile")
                #:options '(#:effective-version "3.0"))
 
 ;; Local Variables:



reply via email to

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