Subject: bug#78100: closed (Re: [bug#78100] [PATCH] guix: gtk-icon-themes: Generate output if no icons)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 28 Apr 2025 13:02:02 +0000

Your bug report

#78100: [PATCH] guix: gtk-icon-themes: Generate output if no icons

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78100: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78100
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#78100] [PATCH] guix: gtk-icon-themes: Generate output if no icons
From: 宋文武 <[email-masked]>
To: Rutherther <[email-masked]>
Cc: [email-masked], Liliana Marie Prikler <[email-masked]>
Date: Mon, 28 Apr 2025 21:06:27 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Rutherther <[email-masked]> writes:

> When there are no icon themes, but gtk+ is referenced in the manifest,
> the output won't be produced in the gtk-icon-themes derivation.
> This will lead to an error.
>
> The problem has been reported by lilyp on IRC. I can't find any packages in
> Guix that use gtk+ in inputs and don't have any icons, but this low-effort
> package replicates the issue:

Pushed to master as commit d47379b8dc6fb, thank you!

Subject: [PATCH] guix: gtk-icon-themes: Generate output if no icons
From: Rutherther <[email-masked]>
To: [email-masked]
Cc: Rutherther <[email-masked]>
Date: Sun, 27 Apr 2025 23:05:25 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

When there are no icon themes, but gtk+ is referenced in the manifest,
the output won't be produced in the gtk-icon-themes derivation.
This will lead to an error.

The problem has been reported by lilyp on IRC. I can't find any packages in
Guix that use gtk+ in inputs and don't have any icons, but this low-effort
package replicates the issue:
```
(package
  (inherit bash)
  (inputs
    (modify-inputs
      (package-inputs bash)
      (append gtk+))))
```

* guix/profiles.scm (gtk-icon-themes): Produce output when no icon cache is created.

Change-Id: I2aa5ab0023c9c584182c67f79102fb66b46a3a7d
---
 guix/profiles.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index 64d669c353..086280329e 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1379,6 +1379,9 @@ (define* (gtk-icon-themes manifest #:optional system)
                          (srfi srfi-26)
                          (ice-9 ftw))
 
+            ;; Ensure output is produced when no cache files are created.
+            (mkdir-p #$output)
+
             (let* ((destdir  (string-append #$output "/share/icons"))
                    (icondirs (filter file-exists?
                                      (map (cut string-append <> "/share/icons")

base-commit: 4e79ec48af8173f0f2a86fa2c8f971dc8234b941
-- 
2.49.0