unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts
@ 2022-03-20 11:00 Arun Isaac
  2022-03-20 11:02 ` [bug#54471] [PATCH core-updates 1/2] build: " Arun Isaac
  2022-03-20 11:27 ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Maxime Devos
  0 siblings, 2 replies; 14+ messages in thread
From: Arun Isaac @ 2022-03-20 11:00 UTC (permalink / raw)
  To: 54471; +Cc: Arun Isaac

Hi,

Currently, we don't install the woff and woff2 web fonts in our font build
system. The first patch fixes that. The second patches removes the return of
#t from phases.

Regards,
Arun

Arun Isaac (2):
  build: font-build-system: Install web fonts.
  build: font-build-system: Do not return #t from phases.

 guix/build/font-build-system.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.34.0





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

* [bug#54471] [PATCH core-updates 1/2] build: font-build-system: Install web fonts.
  2022-03-20 11:00 [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Arun Isaac
@ 2022-03-20 11:02 ` Arun Isaac
  2022-03-20 11:02   ` [bug#54471] [PATCH core-updates 2/2] build: font-build-system: Do not return #t from phases Arun Isaac
  2022-03-20 11:27 ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Maxime Devos
  1 sibling, 1 reply; 14+ messages in thread
From: Arun Isaac @ 2022-03-20 11:02 UTC (permalink / raw)
  To: 54471; +Cc: Arun Isaac

* guix/build/font-build-system.scm (install): Install woff and woff2 web font
files.
---
 guix/build/font-build-system.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 6726595fe1..9bd9524a7d 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2022 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -54,6 +54,8 @@ (define* (install #:key outputs #:allow-other-keys)
               (find-files source "\\.(ttf|ttc)$"))
     (for-each (cut install-file <> (string-append fonts "/opentype"))
               (find-files source "\\.(otf|otc)$"))
+    (for-each (cut install-file <> (string-append fonts "/web"))
+              (find-files source "\\.(woff|woff2)$"))
     #t))
 
 (define %standard-phases
-- 
2.34.0





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

* [bug#54471] [PATCH core-updates 2/2] build: font-build-system: Do not return #t from phases.
  2022-03-20 11:02 ` [bug#54471] [PATCH core-updates 1/2] build: " Arun Isaac
@ 2022-03-20 11:02   ` Arun Isaac
  0 siblings, 0 replies; 14+ messages in thread
From: Arun Isaac @ 2022-03-20 11:02 UTC (permalink / raw)
  To: 54471; +Cc: Arun Isaac

* guix/build/font-build-system.scm (unpack, install): Do not return #t from
phases.
---
 guix/build/font-build-system.scm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 9bd9524a7d..e4784bc17d 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -41,8 +41,7 @@ (define* (unpack #:key source #:allow-other-keys)
       (begin
         (mkdir "source")
         (chdir "source")
-        (copy-file source (strip-store-file-name source))
-        #t)
+        (copy-file source (strip-store-file-name source)))
       (gnu:unpack #:source source)))
 
 (define* (install #:key outputs #:allow-other-keys)
@@ -55,8 +54,7 @@ (define* (install #:key outputs #:allow-other-keys)
     (for-each (cut install-file <> (string-append fonts "/opentype"))
               (find-files source "\\.(otf|otc)$"))
     (for-each (cut install-file <> (string-append fonts "/web"))
-              (find-files source "\\.(woff|woff2)$"))
-    #t))
+              (find-files source "\\.(woff|woff2)$"))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
-- 
2.34.0





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

* [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts
  2022-03-20 11:00 [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Arun Isaac
  2022-03-20 11:02 ` [bug#54471] [PATCH core-updates 1/2] build: " Arun Isaac
@ 2022-03-20 11:27 ` Maxime Devos
  2022-03-21 12:17   ` Arun Isaac
                     ` (3 more replies)
  1 sibling, 4 replies; 14+ messages in thread
From: Maxime Devos @ 2022-03-20 11:27 UTC (permalink / raw)
  To: Arun Isaac, 54471

[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]

Arun Isaac schreef op zo 20-03-2022 om 16:30 [+0530]:
> Currently, we don't install the woff and woff2 web fonts in our font build
> system. The first patch fixes that. The second patches removes the return of
> #t from phases.

font-build-system currently puts "tar", "gzip", "bzip2", "unzip" (*),
and "xz" in 'host-inputs' (the build system equivalent of 'inputs')
instead of 'build-inputs' (the build system equivalent of 'native-
inputs'), which is wrong when cross-compiling.

For font-build-system, this does not truly matter, since #:target is
ignored for font-build-system.  However, to avoid accidentally teaching
people to accidentally mess up the inputs/native-inputs difference and
instead give the right example, WDYT of moving "tar" and friends to
'build-inputs'?

It's technically a separate thing from your patches, but I think it
would be nice to bundle multiple core-updates changes together (in
separate patches, but in a same ‘push’).

(*) The location of 'source' does not matter since sources are
(currently) assumed to be architecture-independent in Guix.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts
  2022-03-20 11:27 ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Maxime Devos
@ 2022-03-21 12:17   ` Arun Isaac
  2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 1/3] build: " Arun Isaac
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Arun Isaac @ 2022-03-21 12:17 UTC (permalink / raw)
  To: Maxime Devos, 54471


Hi Maxime,

Sure, sounds good! Patches follow in subsequent emails.

Regards,
Arun




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

* [bug#54471] [PATCH core-updates v2 1/3] build: font-build-system: Install web fonts.
  2022-03-20 11:27 ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Maxime Devos
  2022-03-21 12:17   ` Arun Isaac
@ 2022-03-21 12:17   ` Arun Isaac
  2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 2/3] build: font-build-system: Do not return #t from phases Arun Isaac
  2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs Arun Isaac
  3 siblings, 0 replies; 14+ messages in thread
From: Arun Isaac @ 2022-03-21 12:17 UTC (permalink / raw)
  To: Maxime Devos, Arun Isaac, 54471

* guix/build/font-build-system.scm (install): Install woff and woff2 web font
files.
---
 guix/build/font-build-system.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 6726595fe1..9bd9524a7d 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2022 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -54,6 +54,8 @@ (define* (install #:key outputs #:allow-other-keys)
               (find-files source "\\.(ttf|ttc)$"))
     (for-each (cut install-file <> (string-append fonts "/opentype"))
               (find-files source "\\.(otf|otc)$"))
+    (for-each (cut install-file <> (string-append fonts "/web"))
+              (find-files source "\\.(woff|woff2)$"))
     #t))
 
 (define %standard-phases
-- 
2.34.0





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

* [bug#54471] [PATCH core-updates v2 2/3] build: font-build-system: Do not return #t from phases.
  2022-03-20 11:27 ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Maxime Devos
  2022-03-21 12:17   ` Arun Isaac
  2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 1/3] build: " Arun Isaac
@ 2022-03-21 12:17   ` Arun Isaac
  2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs Arun Isaac
  3 siblings, 0 replies; 14+ messages in thread
From: Arun Isaac @ 2022-03-21 12:17 UTC (permalink / raw)
  To: Maxime Devos, Arun Isaac, 54471

* guix/build/font-build-system.scm (unpack, install): Do not return #t from
phases.
---
 guix/build/font-build-system.scm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 9bd9524a7d..e4784bc17d 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -41,8 +41,7 @@ (define* (unpack #:key source #:allow-other-keys)
       (begin
         (mkdir "source")
         (chdir "source")
-        (copy-file source (strip-store-file-name source))
-        #t)
+        (copy-file source (strip-store-file-name source)))
       (gnu:unpack #:source source)))
 
 (define* (install #:key outputs #:allow-other-keys)
@@ -55,8 +54,7 @@ (define* (install #:key outputs #:allow-other-keys)
     (for-each (cut install-file <> (string-append fonts "/opentype"))
               (find-files source "\\.(otf|otc)$"))
     (for-each (cut install-file <> (string-append fonts "/web"))
-              (find-files source "\\.(woff|woff2)$"))
-    #t))
+              (find-files source "\\.(woff|woff2)$"))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
-- 
2.34.0





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

* [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs.
  2022-03-20 11:27 ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Maxime Devos
                     ` (2 preceding siblings ...)
  2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 2/3] build: font-build-system: Do not return #t from phases Arun Isaac
@ 2022-03-21 12:17   ` Arun Isaac
  2022-04-09 15:56     ` Arun Isaac
  3 siblings, 1 reply; 14+ messages in thread
From: Arun Isaac @ 2022-03-21 12:17 UTC (permalink / raw)
  To: Maxime Devos, Arun Isaac, 54471

* guix/build-system/font.scm (lower): Move tar, gzip, bzip2, unzip and xz from
host-inputs to build-inputs.
---
 guix/build-system/font.scm | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index 74dc80b5db..c43fb9a542 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2022 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,20 +54,20 @@ (define private-keywords
   (bag
     (name name)
     (system system)
-    (host-inputs `(,@(if source
-                         `(("source" ,source))
-                         '())
-                   ,@inputs
-                   ,(list "tar" (module-ref (resolve-interface '(gnu packages base)) 'tar))
-                   ,@(let ((compression (resolve-interface '(gnu packages compression))))
-                       (map (match-lambda
-                              ((name package)
-                               (list name (module-ref compression package))))
-                            `(("gzip" gzip)
-                              ("bzip2" bzip2)
-                              ("unzip" unzip)
-                              ("xz" xz))))))
-    (build-inputs native-inputs)
+    (host-inputs inputs)
+    (build-inputs `(,@(if source
+                          `(("source" ,source))
+                          '())
+                    ,@native-inputs
+                    ,(list "tar" (module-ref (resolve-interface '(gnu packages base)) 'tar))
+                    ,@(let ((compression (resolve-interface '(gnu packages compression))))
+                        (map (match-lambda
+                               ((name package)
+                                (list name (module-ref compression package))))
+                             `(("gzip" gzip)
+                               ("bzip2" bzip2)
+                               ("unzip" unzip)
+                               ("xz" xz))))))
     (outputs outputs)
     (build font-build)
     (arguments (strip-keyword-arguments private-keywords arguments))))
-- 
2.34.0





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

* [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs.
  2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs Arun Isaac
@ 2022-04-09 15:56     ` Arun Isaac
  2022-04-09 16:03       ` Maxime Devos
  2022-04-09 16:04       ` Maxime Devos
  0 siblings, 2 replies; 14+ messages in thread
From: Arun Isaac @ 2022-04-09 15:56 UTC (permalink / raw)
  To: Maxime Devos, 54471


Hi Maxime,

May I push the v2 patchset to core-updates? Is it satisfactory?

Thanks!
Arun




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

* [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs.
  2022-04-09 15:56     ` Arun Isaac
@ 2022-04-09 16:03       ` Maxime Devos
  2022-04-09 16:04       ` Maxime Devos
  1 sibling, 0 replies; 14+ messages in thread
From: Maxime Devos @ 2022-04-09 16:03 UTC (permalink / raw)
  To: Arun Isaac, 54471

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

Arun Isaac schreef op za 09-04-2022 om 21:26 [+0530]:
> Hi Maxime,
> 
> May I push the v2 patchset to core-updates? Is it satisfactory?

AFAICT, yes, and other people have had some time to chime in.

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs.
  2022-04-09 15:56     ` Arun Isaac
  2022-04-09 16:03       ` Maxime Devos
@ 2022-04-09 16:04       ` Maxime Devos
  2022-04-09 16:54         ` Arun Isaac
  1 sibling, 1 reply; 14+ messages in thread
From: Maxime Devos @ 2022-04-09 16:04 UTC (permalink / raw)
  To: Arun Isaac, 54471

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

Arun Isaac schreef op za 09-04-2022 om 21:26 [+0530]:
> May I push the v2 patchset to core-updates? Is it satisfactory?

(addition to previous e-mail)

though there seems to be a preference to batching multiple core-updates
changes together, to reduce build farm activity.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs.
  2022-04-09 16:04       ` Maxime Devos
@ 2022-04-09 16:54         ` Arun Isaac
  2022-05-15 18:06           ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: Arun Isaac @ 2022-04-09 16:54 UTC (permalink / raw)
  To: Maxime Devos, 54471


> though there seems to be a preference to batching multiple core-updates
> changes together, to reduce build farm activity.

Ah, ok. So, I'll wait until a core-updates batch starts up again.

Thanks!




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

* [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts
  2022-04-09 16:54         ` Arun Isaac
@ 2022-05-15 18:06           ` Ludovic Courtès
  2022-05-16  9:44             ` bug#54471: " Arun Isaac
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2022-05-15 18:06 UTC (permalink / raw)
  To: Arun Isaac; +Cc: Maxime Devos, 54471

Hi Arun,

I think it can go to ‘core-updates’, yes.

Actually, how many package rebuilds does it trigger?  Does that affect,
say:

  ./pre-inst-env guix build libreoffice -n

?

If not, you might as well push it to ‘master’.  Otherwise, it might be
that ‘staging’ would be a good fit.  You “just” need to estimate the
amount of rebuild.

Thanks,
Ludo’.




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

* bug#54471: [PATCH core-updates 0/2] font-build-system: Install web fonts
  2022-05-15 18:06           ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Ludovic Courtès
@ 2022-05-16  9:44             ` Arun Isaac
  0 siblings, 0 replies; 14+ messages in thread
From: Arun Isaac @ 2022-05-16  9:44 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Maxime Devos, 54471-done


Hi Ludo,

I've pushed these patches to core-updates.

> Actually, how many package rebuilds does it trigger?  Does that affect,
> say:
>
>   ./pre-inst-env guix build libreoffice -n
>
> ?

font-dejavu is rebuilt by these changes, and a rebuild of font-dejavu
triggers a rebuild of the world (15596 packages!). So, definitely not
the master branch!

Regards,
Arun




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

end of thread, other threads:[~2022-05-16  9:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-20 11:00 [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Arun Isaac
2022-03-20 11:02 ` [bug#54471] [PATCH core-updates 1/2] build: " Arun Isaac
2022-03-20 11:02   ` [bug#54471] [PATCH core-updates 2/2] build: font-build-system: Do not return #t from phases Arun Isaac
2022-03-20 11:27 ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Maxime Devos
2022-03-21 12:17   ` Arun Isaac
2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 1/3] build: " Arun Isaac
2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 2/3] build: font-build-system: Do not return #t from phases Arun Isaac
2022-03-21 12:17   ` [bug#54471] [PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs Arun Isaac
2022-04-09 15:56     ` Arun Isaac
2022-04-09 16:03       ` Maxime Devos
2022-04-09 16:04       ` Maxime Devos
2022-04-09 16:54         ` Arun Isaac
2022-05-15 18:06           ` [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts Ludovic Courtès
2022-05-16  9:44             ` bug#54471: " Arun Isaac

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).