diff mbox series

[bug#67808,1/5] guix: build-system: font: Accept license-file-regexp keyword argument

Message ID 123127b6a5bf1c94ff62b0779837a6e54975c81f.1702454367.git.saku@laesvuori.fi
State New
Headers show
Series [bug#67808,1/5] guix: build-system: font: Accept license-file-regexp keyword argument | expand

Commit Message

Saku Laesvuori Dec. 13, 2023, 8 a.m. UTC
* guix/build-system/font.scm: (font-build): Pass license-file-regexp
keyword argument to font-build.
* guix/build-system/gnu.scm: Export %license-file-regexp.

Change-Id: I4e9378cbed9a8c3b9838efcd448e9bfec8ba97be
---
 guix/build-system/font.scm | 2 ++
 guix/build-system/gnu.scm  | 1 +
 2 files changed, 3 insertions(+)


base-commit: 4bf4e340b74b66a0fc319aeb100fb1f948a67211

Comments

Simon South Dec. 13, 2023, 2:33 p.m. UTC | #1
Thanks for raising this again, Saku.

The issue of the font-build-system not exposing its %license-file-regexp
argument affects a number of font packages that either define a
redundant phase or simply fail to install the right license files from
their distribution.  I attempted to address the problem comprehensively
with the patches in issue 61253:

https://issues.guix.gnu.org/61253

In addition to exposing the "%license-file-regexp" argument the changes
there also provide a default value that matches common font-license file
names (including "OFL.txt") and correct the 29 font packages I found to
have issues.

If there's interest in fixing this, I'm willing to review those patches
to verify they fix the problem globally.  Saku's update to the
font-jetbrains-mono package and addition of font-jetbrains-mono-nerd
could then (and maybe should) be handled each as a separate issue.
Saku Laesvuori Dec. 14, 2023, 6:46 a.m. UTC | #2
> Thanks for raising this again, Saku.
> 
> The issue of the font-build-system not exposing its %license-file-regexp
> argument affects a number of font packages that either define a
> redundant phase or simply fail to install the right license files from
> their distribution.  I attempted to address the problem comprehensively
> with the patches in issue 61253:
> 
> https://issues.guix.gnu.org/61253
> 
> In addition to exposing the "%license-file-regexp" argument the changes
> there also provide a default value that matches common font-license file
> names (including "OFL.txt") and correct the 29 font packages I found to
> have issues.

That looks like a much more complete fix/improvement than mine. Great!

> If there's interest in fixing this, I'm willing to review those patches
> to verify they fix the problem globally.  Saku's update to the
> font-jetbrains-mono package and addition of font-jetbrains-mono-nerd
> could then (and maybe should) be handled each as a separate issue.

Sounds good to me. I'll rebase those patches onto your's now and again
later if needed.
diff mbox series

Patch

diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index c57c304f52..893e9f635e 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -81,6 +81,7 @@  (define* (font-build name inputs
                      (search-paths '())
                      (system (%current-system))
                      (guile #f)
+                     (license-file-regexp %license-file-regexp)
                      (imported-modules %font-build-system-modules)
                      (modules '((guix build font-build-system)
                                 (guix build utils))))
@@ -94,6 +95,7 @@  (define* (font-build name inputs
               #~(font-build #:name #$name
                             #:source #+source
                             #:configure-flags #$configure-flags
+                            #:license-file-regexp #$license-file-regexp
                             #:system #$system
                             #:test-target #$test-target
                             #:tests? #$tests?
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index cdbb547773..b8082354b9 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -28,6 +28,7 @@  (define-module (guix build-system gnu)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
   #:export (%gnu-build-system-modules
+            %license-file-regexp
             %strip-flags
             %strip-directories
             gnu-build