diff mbox series

[bug#42373] gnu: hedgewars: Install desktop icon.

Message ID 20200715171347.4898-1-timotej.lazar@araneo.si
State Accepted
Headers show
Series [bug#42373] gnu: hedgewars: Install desktop icon. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Timotej Lazar July 15, 2020, 5:13 p.m. UTC
* gnu/packages/games.scm (hedgewars)[arguments]: Add ‘install-icon’ phase.
---
 gnu/packages/games.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Nicolas Goaziou July 16, 2020, 11:52 p.m. UTC | #1
Hello,

Timotej Lazar <timotej.lazar@araneo.si> writes:

> * gnu/packages/games.scm (hedgewars)[arguments]: Add ‘install-icon’
> phase.

Applied. Thank you.

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5de6dbf4ac..e60c455cb6 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -8813,7 +8813,15 @@  play with up to four players simultaneously.  It has network support.")
        #:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _ (invoke "ctest"))))))
+           (lambda _ (invoke "ctest")))
+         (add-after 'install 'install-icon
+           (lambda _
+             ;; Install icon for the desktop file.
+             (let* ((out (assoc-ref %outputs "out"))
+                    (icons (string-append out "/share/icons/hicolor/512x512/apps")))
+               (with-directory-excursion (string-append "../hedgewars-src-" ,version)
+                 (install-file "misc/hedgewars.png" icons)))
+             #t)))))
     (inputs
      `(("ffmpeg" ,ffmpeg)
        ("freeglut" ,freeglut)