diff options
-rw-r--r-- | .guix-channel | 12 | ||||
-rw-r--r-- | tw/packages/games.scm | 74 |
2 files changed, 84 insertions, 2 deletions
diff --git a/.guix-channel b/.guix-channel index b201e3f1..122a34a7 100644 --- a/.guix-channel +++ b/.guix-channel @@ -5,11 +5,19 @@ (name 'tw) (url "https://git.twilken.net/dotfiles") (dependencies - (channel + (channel ; For non-free packages. (name nonguix) (url "https://gitlab.com/nonguix/nonguix") (introduction (channel-introduction (version 0) (commit "897c1a470da759236cc11798f4e0a5f7d4d59fbc") - (signer "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))) + (signer "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) + (channel ; Build support for some games, e.g. Rail Route. + (name guix-gaming-games) + (url "https://gitlab.com/guix-gaming-channels/games.git") + (introduction + (channel-introduction + (version 0) + (commit "c23d64f1b8cc086659f8781b27ab6c7314c5cca5") + (signer "50F3 3E2E 5B0C 3D90 0424 ABE8 9BDC F497 A4BB CC7F")))))) 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")))) |