summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSughosha <sughosha@disroot.org>2026-04-23 09:10:39 +0530
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2026-05-01 07:46:46 +0200
commit5f9b8ceff978718e6e28e795d5d781cc24238dd4 (patch)
treeeb5ba894217433c4e709fe19524e34e40e187d7b
parentf98748a48539f0b3329d1c31483c7ef3bb645c28 (diff)
gnu: ring-racers: Install icon and create desktop entry.
* gnu/packages/games.scm (ring-racers)[source]<snippet>: Rename the icon file. [arguments]<#:phases>: Remove ‘move-and-wrap-binary’ phase. Use replacement for ‘install’. Add ‘wrap-program’ and ‘create-desktop-entry’. Change-Id: I0165f931132fe025731f92c15ff8df4d788f81fa Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
-rw-r--r--gnu/packages/games.scm33
1 files changed, 25 insertions, 8 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 3d8c7e1945..f686ea6b12 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5344,7 +5344,9 @@ also available.")
(with-directory-excursion "src"
(substitute* "CMakeLists.txt"
(("glm::glm")
- "glm")))))))
+ "glm")))
+ ;; Rename the icon to match with the executable file.
+ (rename-file "srb2.png" "ringracers.png")))))
(build-system cmake-build-system)
(arguments
(list
@@ -5354,15 +5356,30 @@ also available.")
"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O3 -g -DNDEBUG'")
#:phases
#~(modify-phases %standard-phases
- (add-after 'install 'move-and-wrap-binary
+ (replace 'install
+ (lambda _
+ (install-file "bin/ringracers" (string-append #$output "/bin"))
+ (install-file "../source/ringracers.png"
+ (string-append #$output "/share/pixmaps"))))
+ (add-after 'install 'wrap-program
;; Install executable to $out/bin.
(lambda* (#:key inputs #:allow-other-keys)
- (with-directory-excursion #$output
- (mkdir "bin")
- (rename-file "ringracers" "bin/ringracers")
- (wrap-program "bin/ringracers"
- `("RINGRACERSWADDIR" =
- (,(assoc-ref inputs "ring-racers-data"))))))))))
+ (wrap-program "bin/ringracers"
+ `("RINGRACERSWADDIR" =
+ (,(assoc-ref inputs "ring-racers-data"))))))
+ (add-after 'wrap-program 'create-desktop-entry
+ (lambda _
+ (let* ((datadir (string-append #$output "/share"))
+ (appdir (string-append datadir "/applications")))
+ (mkdir-p appdir)
+ (make-desktop-entry-file (string-append appdir
+ "/ringracers.desktop")
+ #:name "Dr. Robotnik's Ring Racers"
+ #:comment "Technical kart racing game"
+ #:icon "ringracers"
+ #:exec (string-append #$output "/bin/ringracers")
+ #:startup-notify #f
+ #:categories '("Application" "Game"))))))))
(native-inputs (list pkg-config))
(inputs (list glm
libogg