gnu: hedgewars: Install desktop icon.
authorTimotej Lazar <timotej.lazar@araneo.si>
Wed, 15 Jul 2020 17:13:47 +0000 (19:13 +0200)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Thu, 16 Jul 2020 23:51:56 +0000 (01:51 +0200)
* gnu/packages/games.scm (hedgewars)[arguments]: Add ‘install-icon’ phase.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
gnu/packages/games.scm

index 5de6dbf..e60c455 100644 (file)
@@ -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)