unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Timotej Lazar <timotej.lazar@araneo.si>
To: 41365@debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar@araneo.si>
Subject: [bug#41365] [PATCH 4/5] gnu: godot: Install provided .desktop file and icons.
Date: Sun, 17 May 2020 17:55:19 +0200	[thread overview]
Message-ID: <20200517155520.26183-4-timotej.lazar@araneo.si> (raw)
In-Reply-To: <20200517155520.26183-1-timotej.lazar@araneo.si>

* 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.
---
 gnu/packages/game-development.scm | 30 ++++++++++++------------------
 1 file changed, 12 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 2ed3055cfc..1cbe0e4f0d 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1643,24 +1643,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)
-- 
2.26.2





  parent reply	other threads:[~2020-05-17 15:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 15:52 [bug#41365] [PATCH 0/5] Add superstarfighter Timotej Lazar
2020-05-17 15:55 ` [bug#41365] [PATCH 1/5] gnu: godot: Enable release build Timotej Lazar
2020-05-17 15:55   ` [bug#41365] [PATCH 2/5] gnu: godot: Remove obsolete workaround for aarch64 Timotej Lazar
2020-05-17 15:55   ` [bug#41365] [PATCH 3/5] gnu: godot: Build and install the headless version Timotej Lazar
2020-05-17 15:55   ` Timotej Lazar [this message]
2020-05-17 15:55   ` [bug#41365] [PATCH 5/5] gnu: Add superstarfighter Timotej Lazar
2020-05-17 15:55 ` [bug#41365] [PATCH 0/5] " Nicolò Balzarotti
2020-05-17 16:03   ` Timotej Lazar
2020-05-18 18:53 ` bug#41365: " Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200517155520.26183-4-timotej.lazar@araneo.si \
    --to=timotej.lazar@araneo.si \
    --cc=41365@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).