summaryrefslogtreecommitdiff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-01-15 11:21:36 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2020-01-15 11:21:36 +0100
commit93605bfd25665c181c22cdb2453138b3db1936bd (patch)
tree79ae6d506746e9e4297eb4a4a6a8ad9ef2b211f8 /gnu/packages/games.scm
parentd24881e4ebc587cf6a6fe1e3fd670965ede2e044 (diff)
downloadpatches-93605bfd25665c181c22cdb2453138b3db1936bd.tar
patches-93605bfd25665c181c22cdb2453138b3db1936bd.tar.gz
gnu: gnubg: Add desktop file.
* gnu/packages/games.scm (gnubg)[arguments]: Add an 'install-desktop-file' phase.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 209307db48..975658de18 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -866,6 +866,26 @@ destroying an ancient book using a special wand.")
("libcanberra" ,libcanberra)))
(native-inputs `(("python-2" ,python-2)
("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-desktop-file
+ (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 "/gnubg.desktop")
+ (lambda _
+ (format #t
+ "[Desktop Entry]~@
+ Name=GNU Backgammon~@
+ Exec=~a/bin/gnubg -w~@
+ Icon=gnubg~@
+ Categories=Game;~@
+ Terminal=false~@
+ Type=Application~%"
+ out))))
+ #t)))))
(home-page "https://www.gnu.org/software/gnubg/")
(synopsis "Backgammon game")
(description "The GNU backgammon application (also known as \"gnubg\") can