summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2020-05-17 17:55:19 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2020-05-18 18:25:27 +0200
commitbf076da917c3fe3732e2b1a8959b3ed2677b3b4a (patch)
treef6dda1c0dddb1596722fb49933bc1b65033ed088
parent545511df77837079afa63c1b420d8dd2b67f7235 (diff)
downloadpatches-bf076da917c3fe3732e2b1a8959b3ed2677b3b4a.tar
patches-bf076da917c3fe3732e2b1a8959b3ed2677b3b4a.tar.gz
gnu: godot: Install provided .desktop file and icons.
* gnu/packages/game-development.scm (godot)[arguments]: Install the provided godot.desktop instead of creating a new one. Copy icons to the correct location in share/icons/hicolor as per XDG. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-rw-r--r--gnu/packages/game-development.scm30
1 files changed, 12 insertions, 18 deletions
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 03369a6d44..ac9c2ce864 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1644,24 +1644,18 @@ games.")
(add-after 'install 'install-godot-desktop
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (desktop (string-append out "/share/applications"))
- (icon-dir (string-append out "/share/pixmaps")))
- (rename-file "icon.png" "godot.png")
- (install-file "godot.png" icon-dir)
- (mkdir-p desktop)
- (with-output-to-file
- (string-append desktop "/godot.desktop")
- (lambda _
- (format #t
- "[Desktop Entry]~@
- Name=godot~@
- Comment=The godot game engine~@
- Exec=~a/bin/godot~@
- TryExec=~@*~a/bin/godot~@
- Icon=godot~@
- Type=Application~%"
- out)))
- #t))))))
+ (applications (string-append out "/share/applications"))
+ (icons (string-append out "/share/icons/hicolor")))
+ (mkdir-p applications)
+ (copy-file "misc/dist/linux/org.godotengine.Godot.desktop"
+ (string-append applications "/godot.desktop"))
+ (for-each (lambda (icon dest)
+ (mkdir-p (dirname dest))
+ (copy-file icon dest))
+ '("icon.png" "icon.svg")
+ `(,(string-append icons "/256x256/apps/godot.png")
+ ,(string-append icons "/scalable/apps/godot.svg"))))
+ #t)))))
(outputs '("out" "headless"))
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("alsa-lib" ,alsa-lib)