summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2025-02-16 18:50:04 -0500
committerJohn Kehayias <john.kehayias@protonmail.com>2025-02-16 18:50:04 -0500
commit2ed247c0c86b8cfefe1cb689a94a635e204bada6 (patch)
treefd77340d3cf6dcb75bf60b72ae1e63aeb11d59c1
parent8327932008c1c5e5d541d872ecac8b1f4f5beef0 (diff)
gnu: heroic-client: Fix .desktop file.
* nongnu/packages/game-client.scm (heroic-client)[arguments]<#:phases>: Add fix-desktop-file phase to set the "Exec" line to "heroic" to run the correct binary. Remove setting the full store path in the .desktop file in the setup-cwd phase. Delete the patch-dot-desktop-files phase (not needed).
-rw-r--r--nongnu/packages/game-client.scm15
1 files changed, 10 insertions, 5 deletions
diff --git a/nongnu/packages/game-client.scm b/nongnu/packages/game-client.scm
index f7cb4c13..b434285d 100644
--- a/nongnu/packages/game-client.scm
+++ b/nongnu/packages/game-client.scm
@@ -81,11 +81,16 @@
;; Use the more standard lib directory for everything.
(rename-file "opt/" "lib")
;; Remove unneeded files.
- (delete-file-recursively "usr")
- ;; Fix the .desktop file binary location.
- (substitute* '("share/applications/heroic.desktop")
- (("/opt/Heroic/")
- (string-append #$output "/bin/")))))
+ (delete-file-recursively "usr")))
+ ;; Fix the .desktop file "Exec" line to just be "heroic" in
+ ;; order for this desktop file to be useful to launch heroic in
+ ;; the container (heroic package) as well.
+ (add-after 'patch-dot-desktop-files 'fix-desktop-file
+ (lambda _
+ (substitute*
+ (string-append #$output "/share/applications/heroic.desktop")
+ (("Exec=.*/heroic") "Exec=heroic"))))
+ (delete 'patch-dot-desktop-files)
(add-after 'install 'symlink-binary-file
(lambda _
(mkdir-p (string-append #$output "/bin"))