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.
This commit is contained in:
Efraim Flashner 2019-09-13 16:49:18 +03:00
parent dbb0b06eb4
commit 18a613fb29
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -2210,7 +2210,24 @@ (define-public gnujump
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before (add-before
'configure 'link-libm '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 (inputs
`(("glu" ,glu) `(("glu" ,glu)
("mesa" ,mesa) ("mesa" ,mesa)