mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
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>
This commit is contained in:
parent
545511df77
commit
bf076da917
1 changed files with 12 additions and 18 deletions
|
@ -1644,24 +1644,18 @@ (define-public godot
|
||||||
(add-after 'install 'install-godot-desktop
|
(add-after 'install 'install-godot-desktop
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(desktop (string-append out "/share/applications"))
|
(applications (string-append out "/share/applications"))
|
||||||
(icon-dir (string-append out "/share/pixmaps")))
|
(icons (string-append out "/share/icons/hicolor")))
|
||||||
(rename-file "icon.png" "godot.png")
|
(mkdir-p applications)
|
||||||
(install-file "godot.png" icon-dir)
|
(copy-file "misc/dist/linux/org.godotengine.Godot.desktop"
|
||||||
(mkdir-p desktop)
|
(string-append applications "/godot.desktop"))
|
||||||
(with-output-to-file
|
(for-each (lambda (icon dest)
|
||||||
(string-append desktop "/godot.desktop")
|
(mkdir-p (dirname dest))
|
||||||
(lambda _
|
(copy-file icon dest))
|
||||||
(format #t
|
'("icon.png" "icon.svg")
|
||||||
"[Desktop Entry]~@
|
`(,(string-append icons "/256x256/apps/godot.png")
|
||||||
Name=godot~@
|
,(string-append icons "/scalable/apps/godot.svg"))))
|
||||||
Comment=The godot game engine~@
|
#t)))))
|
||||||
Exec=~a/bin/godot~@
|
|
||||||
TryExec=~@*~a/bin/godot~@
|
|
||||||
Icon=godot~@
|
|
||||||
Type=Application~%"
|
|
||||||
out)))
|
|
||||||
#t))))))
|
|
||||||
(outputs '("out" "headless"))
|
(outputs '("out" "headless"))
|
||||||
(native-inputs `(("pkg-config" ,pkg-config)))
|
(native-inputs `(("pkg-config" ,pkg-config)))
|
||||||
(inputs `(("alsa-lib" ,alsa-lib)
|
(inputs `(("alsa-lib" ,alsa-lib)
|
||||||
|
|
Loading…
Reference in a new issue