Subject: [bug#61040] [PATCH] gnu: emacs-ergoemacs-mode: Include keyboard layout SVGs.

From: Ivan Vilata i Balaguer <[email-masked]>
Date: Wed, 25 Jan 2023 10:33:46 +0100

Nicolas Goaziou (2023-01-24 19:59:20 +0100) wrote:

> Ivan Vilata i Balaguer <[email-masked]> writes:
> 
> > +    (arguments
> > +     (list #:phases #~(modify-phases %standard-phases
> > +                        (add-after 'install 'install-kbd-svgs
> > +                          (lambda _
> > +                            (let ((dir (elpa-directory #$output)))
> > +                              (install-file "kbd.svg" dir)
> > +                              (install-file "kbd-ergo.svg" dir)))))))
> 
> Please use #:include keyword for these files instead of this
> hand-crafted phase.

Thanks Nicolas, I didn't know about the keyword.  Attaching the updated patch.
Much simpler! 🙂

Salut !

-- 
Ivan Vilata i Balaguer -- https://elvil.net/
From 7c21f589e4871ffedcc0d6d2aef4e64bfa08ce58 Mon Sep 17 00:00:00 2001
From: Ivan Vilata-i-Balaguer <[email-masked]>
Date: Wed, 25 Jan 2023 10:29:56 +0100
Subject: [PATCH] gnu: emacs-ergoemacs-mode: Include keyboard layout SVGs.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A couple of SVG files from the source need to be installed to make
‘ergoemacs-theme-describe’ and ‘ergoemacs-layout-describe’ work.

* gnu/packages/emacs-xyz.scm (emacs-ergoemacs-mode)[arguments]: New field.
---
 gnu/packages/emacs-xyz.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ee115192f9..77ab0bc448 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -120,6 +120,7 @@
 ;;; Copyright © 2022 Thiago Jung Bauermann <[email-masked]>
 ;;; Copyright © 2022 Joeke de Graaf <[email-masked]>
 ;;; Copyright © 2023 Simon Streit <[email-masked]>
+;;; Copyright © 2023 Ivan Vilata-i-Balaguer <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19974,6 +19975,9 @@ (define-public emacs-ergoemacs-mode
         (base32
          "1ipwzl0l26g5qvc1sgmz2ra5vn1j3hl0mnkgzpa3j4p8gsmxdiqr"))))
     (build-system emacs-build-system)
+    (arguments
+     (list #:include #~(cons* "^kbd\\.svg$" "^kbd-ergo\\.svg$"
+                              %default-include)))
     (propagated-inputs
      (list emacs-undo-tree))
     (home-page "https://ergoemacs.github.io/")
-- 
2.38.1