GNU bug report logs - #78050
[PATCH 0/5] build-system improvements

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Thu, 24 Apr 2025 22:46:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 78050 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [bug#78050] [PATCH 4/5] build-system: ruby: Improve ruby-cross-build style.
Date: Fri, 25 Apr 2025 02:04:49 +0200
* guix/build-system/ruby.scm
(ruby-cross-build): Use with-imported-modules around the
ruby-cross-build builder gexp.

Change-Id: I1051124f034f2082ccef531e9bcf37913d5a9449
---
 guix/build-system/ruby.scm | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index 33aab5f7190..f258ade6e75 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2014, 2015, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,24 +89,25 @@ (define* (ruby-build name inputs
                                 (guix build utils))))
   "Build SOURCE using RUBY and INPUTS."
   (define build
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        #$(with-build-variables inputs outputs
-            #~(ruby-build #:name #$name
-                          #:source #+source
-                          #:system #$system
-                          #:gem-flags #$gem-flags
-                          #:test-target #$test-target
-                          #:tests? #$tests?
-                          #:phases #$(if (pair? phases)
-                                         (sexp->gexp phases)
-                                         phases)
-                          #:outputs %outputs
-                          #:search-paths '#$(sexp->gexp
-                                             (map search-path-specification->sexp
-                                                  search-paths))
-                          #:inputs %build-inputs))))
+          #$(with-build-variables inputs outputs
+              #~(ruby-build #:name #$name
+                            #:source #+source
+                            #:system #$system
+                            #:gem-flags #$gem-flags
+                            #:test-target #$test-target
+                            #:tests? #$tests?
+                            #:phases #$(if (pair? phases)
+                                           (sexp->gexp phases)
+                                           phases)
+                            #:outputs %outputs
+                            #:search-paths '#$(sexp->gexp
+                                               (map search-path-specification->sexp
+                                                    search-paths))
+                            #:inputs %build-inputs)))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
@@ -113,7 +115,6 @@ (define build
                       #:system system
                       #:target #f
                       #:graft? #f
-                      #:modules imported-modules
                       #:guile-for-build guile)))
 
 (define ruby-build-system
-- 
2.49.0





This bug report was last modified 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.