guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: gnujump: Add desktop file.


From: guix-commits
Subject: 02/02: gnu: gnujump: Add desktop file.
Date: Fri, 13 Sep 2019 10:07:58 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 18a613fb29bf053b344bca585e78a2cf26b44469
Author: Efraim Flashner <address@hidden>
Date:   Fri Sep 13 16:49:18 2019 +0300

    gnu: gnujump: Add desktop file.
    
    This fixes bug#37069.
    
    * gnu/packages/games.scm (gnujump)[arguments]: Add custom
    'create-desktop-entry phase to install a desktop file.
---
 gnu/packages/games.scm | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index f9d7331..c5ab05e 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2210,7 +2210,24 @@ also available.")
        (modify-phases %standard-phases
          (add-before
           'configure 'link-libm
-          (lambda _ (setenv "LIBS" "-lm"))))))
+          (lambda _ (setenv "LIBS" "-lm")))
+         (add-after 'install 'create-desktop-entry
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (apps (string-append out "/share/applications")))
+               (mkdir-p apps)
+               (with-output-to-file
+                 (string-append apps "/gnujump.desktop")
+                 (lambda _
+                   (format #t
+                           "[Desktop Entry]~@
+                           Name=GNUjump~@
+                           Comment=Jump up the tower to survive~@
+                           Exec=~a/bin/gnujump~@
+                           Terminal=false~@
+                           Type=Application~@
+                           Categories=Game;ArcadeGame~%"
+                           out)))))))))
     (inputs
      `(("glu" ,glu)
        ("mesa" ,mesa)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]