aboutsummaryrefslogtreecommitdiff
path: root/tw/packages/games.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tw/packages/games.scm')
-rw-r--r--tw/packages/games.scm74
1 files changed, 74 insertions, 0 deletions
diff --git a/tw/packages/games.scm b/tw/packages/games.scm
index 2837ae3a..680ca5b1 100644
--- a/tw/packages/games.scm
+++ b/tw/packages/games.scm
@@ -30,6 +30,7 @@
#:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
+ #:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module (guix build utils)
#:use-module (guix build-system copy)
@@ -43,6 +44,8 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix modules)
#:use-module (guix packages)
+ #:use-module (games build-system mojo)
+ #:use-module (games gog-download)
#:use-module (nonguix build-system binary)
#:use-module ((nonguix licenses) #:prefix nonguix-license:))
@@ -531,3 +534,74 @@ For those new to the game, the @url{https://oolite.space/starting, getting
started} page has some hints for beginners to see you safely through your
first flight, and suggests ways to continue in future.")
(license #f)))
+
+
+;;; Rail Route
+
+(define-public gog-rail-route
+ (package
+ (name "gog-rail-route")
+ (version "2.0.8.71386")
+ (source
+ (origin
+ (method gog-fetch)
+ (uri "gogdownloader://rail_route/en3installer0")
+ (file-name (format #f "rail_route_~a.sh"
+ (string-replace-substring version "." "_")))
+ (sha256
+ (base32
+ "1fcql3xmpzdcgg9iz77dh8h797m0dmy18dps3z2y35dqda2hj5lb"))))
+ (supported-systems '("x86_64-linux"))
+ (build-system mojo-build-system)
+ (arguments
+ `(#:patchelf-plan
+ '(("UnityPlayer.so"
+ ("gcc:lib" "dbus" "eudev" "mesa" "wayland"
+ "libx11" "libxcursor" "libxext" "libxi" "libxinerama"
+ "libxkbcommon" "libxrandr" "libxscrnsaver" "libxxf86vm"))
+ ("Rail Route.x86" ("gcc:lib"))
+ ("Rail Route_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so" ("gcc:lib" "zlib"))
+ ("Rail Route_Data/MonoBleedingEdge/x86_64/libMonoPosixHelper.so" ("zlib"))
+ ("Rail Route_Data/Plugins/libfmodstudio.so" ("gcc:lib" "libstdc++" "pulseaudio"))
+ ("Rail Route_Data/Plugins/libresonanceaudio.so" ("gcc:lib" "libstdc++" "pulseaudio")))
+ #:phases
+ ,#~(modify-phases %standard-phases
+ ;; The main game executable looks for "UnityPlayer.so" in its
+ ;; directory, so add an $ORIGIN entry to its rpath.
+ (add-after 'patchelf 'add-origin-to-rpath
+ (lambda _
+ (use-modules (ice-9 rdelim) (ice-9 popen))
+ (let* ((binary "data/noarch/game/Rail Route.x86")
+ (patchelf (open-pipe* OPEN_READ "patchelf" "--print-rpath" binary))
+ (rpath (read-line patchelf)))
+ (close-pipe patchelf)
+ (invoke "patchelf" "--set-rpath" (string-append "$ORIGIN:" rpath) binary)))))))
+ (inputs
+ `(("dbus" ,dbus)
+ ("eudev" ,eudev)
+ ("gcc:lib" ,gcc "lib")
+ ("libstdc++" ,(make-libstdc++ gcc))
+ ("libx11" ,libx11)
+ ("libxcursor" ,libxcursor)
+ ("libxext" ,libxext)
+ ("libxi" ,libxi)
+ ("libxinerama" ,libxinerama)
+ ("libxkbcommon" ,libxkbcommon)
+ ("libxrandr" ,libxrandr)
+ ("libxscrnsaver" ,libxscrnsaver)
+ ("libxxf86vm" ,libxxf86vm)
+ ("mesa" ,mesa)
+ ("pulseaudio" ,pulseaudio)
+ ("wayland" ,wayland)
+ ("zlib" ,zlib)))
+ (home-page "https://railroute.eu/")
+ (synopsis "Rail dispatching game with a schematic interface")
+ (description "Enter the world of rail networks and become the dispatcher
+of your dreams! Rail Route is a management and tycoon game based on railroad
+dispatching, offering relaxed, easy to understand (but hard to master)
+gameplay.
+
+Create the route of your dreams in a world where you set the pace, and embark
+on an ever-expanding railway extravaganza.")
+ (license (nonguix-license:undistributable
+ "file://data/noarch/docs/End User License Agreement.txt"))))