all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system
@ 2023-12-30 16:33 Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 1/8] build: glib-or-gtk: Export %glib-or-gtk-build-system-default-modules Tomas Volf
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:33 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

Using glib-or-gtk-build-system requires hard-coding the list of modules in
 #:modules.  Libreoffice and netsurf tried to use
%glib-or-gtk-build-system-modules instead, but that lead to crashes.

This series introduces new %glib-or-gtk-build-system-default-modules that
contains the list that should go into #:modules.  Using it in libreoffice and
netsurf fixes the mentioned crashes.  Other places were adjusted as well to
use it instead of copying over the list.  That would be hard to keep in sync.

Tomas Volf (8):
  build: glib-or-gtk: Export %glib-or-gtk-build-system-default-modules.
  gnu: netsurf: Actually use glib-or-gtk-build-system.
  gnu: libreoffice: Actually use glib-or-gtk-build-system.
  gnu: sugar: Dehardcode #:modules.
  gnu: sugar-datastore: Dehardcode #:modules.
  gnu: sugar-toolkit-gtk3: Dehardcode #:modules.
  gnu: nimf: Dehardcode #:modules.
  gnu: hime: Dehardcode #:modules.

 gnu/packages/language.scm         | 12 ++++--------
 gnu/packages/libreoffice.scm      |  2 +-
 gnu/packages/sugar.scm            | 15 ++++++---------
 gnu/packages/web.scm              |  2 +-
 guix/build-system/glib-or-gtk.scm |  9 +++++----
 5 files changed, 17 insertions(+), 23 deletions(-)


base-commit: f24b14767d362a84e6469682b4fe303b50f4b589
--
2.41.0




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#68150] [PATCH 1/8] build: glib-or-gtk: Export %glib-or-gtk-build-system-default-modules.
  2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
@ 2023-12-30 16:38 ` Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 2/8] gnu: netsurf: Actually use glib-or-gtk-build-system Tomas Volf
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:38 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

The list of modules used by default was not public, so users of this build
system had to pick between copy&pasting the list, or using
%glib-or-gtk-build-system-modules.  The former is sub-optimal, since it is
hard to keep it in sync.  The latter is just wrong and leads to basically
fall-backing to gnu-build-system.

The solution is to export the default list giving the users option to use it
directly.

* guix/build-system/glib-or-gtk.scm
(%glib-or-gtk-build-system-default-modules): Renamed from %default-modules.
(define-module): Export it.
(glib-or-gtk-build), (glib-or-gtk-cross-build): Use it.

Change-Id: I331b2a3f0bdc3ce14eb9f2f80605e7873369168d
---
 guix/build-system/glib-or-gtk.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index 726d19efad..38a6eeb178 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -30,7 +30,8 @@ (define-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:export (%glib-or-gtk-build-system-modules
+  #:export (%glib-or-gtk-build-system-default-modules
+            %glib-or-gtk-build-system-modules
             glib-or-gtk-build
             glib-or-gtk-cross-build
             glib-or-gtk-build-system)
@@ -64,7 +65,7 @@ (define-module (guix build-system glib-or-gtk)
 ;;
 ;; Code:
 
-(define %default-modules
+(define %glib-or-gtk-build-system-default-modules
   ;; Build-side modules made available in the build environment.
   '((guix build glib-or-gtk-build-system)
     (guix build utils)))
@@ -144,7 +145,7 @@ (define* (glib-or-gtk-build name inputs
                             (glib-or-gtk-wrap-excluded-outputs ''())
                             (system (%current-system))
                             (imported-modules %glib-or-gtk-build-system-modules)
-                            (modules %default-modules)
+                            (modules %glib-or-gtk-build-system-default-modules)
                             allowed-references
                             disallowed-references)
   "Build SOURCE with INPUTS.  See GNU-BUILD for more details."
@@ -219,7 +220,7 @@ (define* (glib-or-gtk-cross-build name
                                   (system (%current-system))
                                   (build (nix-system->gnu-triplet system))
                                   (imported-modules %glib-or-gtk-build-system-modules)
-                                  (modules %default-modules)
+                                  (modules %glib-or-gtk-build-system-default-modules)
                                   allowed-references
                                   disallowed-references)
   "Cross-build SOURCE with INPUTS.  See GNU-BUILD for more details."
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#68150] [PATCH 2/8] gnu: netsurf: Actually use glib-or-gtk-build-system.
  2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 1/8] build: glib-or-gtk: Export %glib-or-gtk-build-system-default-modules Tomas Volf
@ 2023-12-30 16:38 ` Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 3/8] gnu: libreoffice: " Tomas Volf
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:38 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

The #:modules argument was based on %glib-or-gtk-build-system-modules, which,
despite the name, should go into #:imported-modules.  When put into #:modules,
it leads to following warning:

    WARNING: (guile-user): `%standard-phases' imported from both (guix build glib-or-gtk-build-system) and (guix build gnu-build-system)

Due to the definition of %glib-or-gtk-build-system-modules

    `((guix build glib-or-gtk-build-system)
      ,@%gnu-build-system-modules)

It results in %standard-phases from gnu-build-system being used, effectively
turning glib-or-gtk-build-system with #:modules set to
%glib-or-gtk-build-system-modules into gnu-build-system.

The solution is to use the (now) exported default value of
 #:modules (%glib-or-gtk-build-system-default-modules) as a base of the
 #:modules.

* gnu/packages/web.scm (netsurf)[arguments]<#:modules>: Use
%glib-or-gtk-build-system-default-modules instead of
%glib-or-gtk-build-system-modules.

Change-Id: Iacc4df7e213dbdae5a783e3aedde7e6e20402025
---
 gnu/packages/web.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 67f59ca9f9..df476e7ccd 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5927,7 +5927,7 @@ (define-public netsurf
                   (ice-9 match)
                   (srfi srfi-1)
                   (sxml simple)
-                  ,@%glib-or-gtk-build-system-modules)
+                  ,@%glib-or-gtk-build-system-default-modules)
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#68150] [PATCH 3/8] gnu: libreoffice: Actually use glib-or-gtk-build-system.
  2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 1/8] build: glib-or-gtk: Export %glib-or-gtk-build-system-default-modules Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 2/8] gnu: netsurf: Actually use glib-or-gtk-build-system Tomas Volf
@ 2023-12-30 16:38 ` Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 4/8] gnu: sugar: Dehardcode #:modules Tomas Volf
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:38 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

The #:modules argument was based on %glib-or-gtk-build-system-modules, which,
despite the name, should go into #:imported-modules.  When put into #:modules,
it leads to following warning:

    WARNING: (guile-user): `%standard-phases' imported from both (guix build glib-or-gtk-build-system) and (guix build gnu-build-system)

Due to the definition of %glib-or-gtk-build-system-modules

    `((guix build glib-or-gtk-build-system)
      ,@%gnu-build-system-modules)

It results in %standard-phases from gnu-build-system being used, effectively
turning glib-or-gtk-build-system with #:modules set to
%glib-or-gtk-build-system-modules into gnu-build-system.

The solution is to use the (now) exported default value of
 #:modules (%glib-or-gtk-build-system-default-modules) as a base of the
 #:modules.

* gnu/packages/libreoffice.scm (libreoffice)[arguments]<#:modules>: Use
%glib-or-gtk-build-system-default-modules instead of
%glib-or-gtk-build-system-modules.

Change-Id: I5304d9993af7d5f1187c6276e72a269aa60f5666
---
 gnu/packages/libreoffice.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 79b30cecaf..6368dbf5bb 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -915,7 +915,7 @@ (define-public libreoffice
                            ,@%glib-or-gtk-build-system-modules)
       #:modules `(((guix build python-build-system) #:select (python-version))
                   (ice-9 textual-ports)
-                  ,@%glib-or-gtk-build-system-modules)
+                  ,@%glib-or-gtk-build-system-default-modules)
       #:tests? #f                       ; Building the tests already fails.
       #:phases
       #~(modify-phases %standard-phases
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#68150] [PATCH 4/8] gnu: sugar: Dehardcode #:modules.
  2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
                   ` (2 preceding siblings ...)
  2023-12-30 16:38 ` [bug#68150] [PATCH 3/8] gnu: libreoffice: " Tomas Volf
@ 2023-12-30 16:38 ` Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 5/8] gnu: sugar-datastore: " Tomas Volf
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:38 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

* gnu/packages/sugar.scm (sugar)[arguments]<#:modules>: Replace the hardcoded
list with %glib-or-gtk-build-system-default-modules.

Change-Id: I5a98d356c3e1a32b71e7949e3425da74081c1e82
---
 gnu/packages/sugar.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm
index 4a0de1b55a..30f78c5576 100644
--- a/gnu/packages/sugar.scm
+++ b/gnu/packages/sugar.scm
@@ -70,9 +70,8 @@ (define-public sugar
       `(,@%glib-or-gtk-build-system-modules
         (guix build python-build-system))
       #:modules
-      '((guix build glib-or-gtk-build-system)
-        ((guix build python-build-system) #:prefix python:)
-        (guix build utils))
+      `(((guix build python-build-system) #:prefix python:)
+        ,@%glib-or-gtk-build-system-default-modules)
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-build-system
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#68150] [PATCH 5/8] gnu: sugar-datastore: Dehardcode #:modules.
  2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
                   ` (3 preceding siblings ...)
  2023-12-30 16:38 ` [bug#68150] [PATCH 4/8] gnu: sugar: Dehardcode #:modules Tomas Volf
@ 2023-12-30 16:38 ` Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 6/8] gnu: sugar-toolkit-gtk3: " Tomas Volf
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:38 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

* gnu/packages/sugar.scm (sugar-datastore)[arguments]<#:modules>: Replace the
hardcoded list with %glib-or-gtk-build-system-default-modules.

Change-Id: I9ceadd163d3f6cd49ed2623b6060b223257e9aed
---
 gnu/packages/sugar.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm
index 30f78c5576..8a79509de2 100644
--- a/gnu/packages/sugar.scm
+++ b/gnu/packages/sugar.scm
@@ -252,9 +252,8 @@ (define-public sugar-datastore
       `(,@%glib-or-gtk-build-system-modules
         (guix build python-build-system))
       #:modules
-      '((guix build glib-or-gtk-build-system)
-        ((guix build python-build-system) #:prefix python:)
-        (guix build utils))
+      `(((guix build python-build-system) #:prefix python:)
+        ,@%glib-or-gtk-build-system-default-modules)
       #:phases
       '(modify-phases %standard-phases
          (add-after 'unpack 'patch-build-system
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#68150] [PATCH 6/8] gnu: sugar-toolkit-gtk3: Dehardcode #:modules.
  2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
                   ` (4 preceding siblings ...)
  2023-12-30 16:38 ` [bug#68150] [PATCH 5/8] gnu: sugar-datastore: " Tomas Volf
@ 2023-12-30 16:38 ` Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 7/8] gnu: nimf: " Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 8/8] gnu: hime: " Tomas Volf
  7 siblings, 0 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:38 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

* gnu/packages/sugar.scm (sugar-toolkit-gtk3)[arguments]<#:modules>: Replace
the hardcoded list with %glib-or-gtk-build-system-default-modules.

Change-Id: I6a5e4511d2e696a673f7d5b49f75285ee488223d
---
 gnu/packages/sugar.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm
index 8a79509de2..6df07d5cc2 100644
--- a/gnu/packages/sugar.scm
+++ b/gnu/packages/sugar.scm
@@ -320,9 +320,8 @@ (define-public sugar-toolkit-gtk3
       `(,@%glib-or-gtk-build-system-modules
         (guix build python-build-system))
       #:modules
-      '((guix build glib-or-gtk-build-system)
-        ((guix build python-build-system) #:prefix python:)
-        (guix build utils))
+      `(((guix build python-build-system) #:prefix python:)
+        ,@%glib-or-gtk-build-system-default-modules)
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-build-system
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#68150] [PATCH 7/8] gnu: nimf: Dehardcode #:modules.
  2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
                   ` (5 preceding siblings ...)
  2023-12-30 16:38 ` [bug#68150] [PATCH 6/8] gnu: sugar-toolkit-gtk3: " Tomas Volf
@ 2023-12-30 16:38 ` Tomas Volf
  2023-12-30 16:38 ` [bug#68150] [PATCH 8/8] gnu: hime: " Tomas Volf
  7 siblings, 0 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:38 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

* gnu/packages/language.scm (nimf)[arguments]<#:modules>: Replace the
hardcoded list with %glib-or-gtk-build-system-default-modules.

Change-Id: I5eaaac4cdd50b635d24b10c7fa2d365dcf392498
---
 gnu/packages/language.scm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index db78425ec9..30af9e33f5 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -99,10 +99,8 @@ (define-public nimf
                            (guix build cmake-build-system)
                            (guix build qt-build-system)
                            (guix build qt-utils))
-      #:modules '((guix build glib-or-gtk-build-system)
-                  ((guix build qt-build-system)
-                   #:prefix qt:)
-                  (guix build utils))
+      #:modules `(((guix build qt-build-system) #:prefix qt:)
+                  ,@%glib-or-gtk-build-system-default-modules)
       #:configure-flags
       #~(list "--with-im-config-data"
               "--with-imsettings-data"
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#68150] [PATCH 8/8] gnu: hime: Dehardcode #:modules.
  2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
                   ` (6 preceding siblings ...)
  2023-12-30 16:38 ` [bug#68150] [PATCH 7/8] gnu: nimf: " Tomas Volf
@ 2023-12-30 16:38 ` Tomas Volf
  7 siblings, 0 replies; 9+ messages in thread
From: Tomas Volf @ 2023-12-30 16:38 UTC (permalink / raw)
  To: 68150; +Cc: Tomas Volf

* gnu/packages/language.scm (hime)[arguments]<#:modules>: Replace the
hardcoded list with %glib-or-gtk-build-system-default-modules.

Change-Id: I5360c0000173b293e9e24290a2e8eaed84e05750
---
 gnu/packages/language.scm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 30af9e33f5..4e64324af1 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -218,10 +218,8 @@ (define-public hime
         (guix build qt-build-system)
         (guix build qt-utils))
        #:modules
-       ((guix build glib-or-gtk-build-system)
-        ((guix build qt-build-system)
-         #:prefix qt:)
-        (guix build utils))
+       (((guix build qt-build-system) #:prefix qt:)
+        ,@%glib-or-gtk-build-system-default-modules)
        #:configure-flags
        (list
         ;; FIXME
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-30 16:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-30 16:33 [bug#68150] [PATCH 0/8] Fix usage of glib-or-gtk-build-system Tomas Volf
2023-12-30 16:38 ` [bug#68150] [PATCH 1/8] build: glib-or-gtk: Export %glib-or-gtk-build-system-default-modules Tomas Volf
2023-12-30 16:38 ` [bug#68150] [PATCH 2/8] gnu: netsurf: Actually use glib-or-gtk-build-system Tomas Volf
2023-12-30 16:38 ` [bug#68150] [PATCH 3/8] gnu: libreoffice: " Tomas Volf
2023-12-30 16:38 ` [bug#68150] [PATCH 4/8] gnu: sugar: Dehardcode #:modules Tomas Volf
2023-12-30 16:38 ` [bug#68150] [PATCH 5/8] gnu: sugar-datastore: " Tomas Volf
2023-12-30 16:38 ` [bug#68150] [PATCH 6/8] gnu: sugar-toolkit-gtk3: " Tomas Volf
2023-12-30 16:38 ` [bug#68150] [PATCH 7/8] gnu: nimf: " Tomas Volf
2023-12-30 16:38 ` [bug#68150] [PATCH 8/8] gnu: hime: " Tomas Volf

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.