From 75ec2d1e8bc6051ea8a65d2b48ce4e1eb47ca932 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sat, 18 May 2024 17:47:10 +0200 Subject: Update Simutrans and pak128 to 124.0 and 2.9 This Simutrans version now uses the XDG standard by default. --- tw/packages/files/simutrans-paths.patch | 18 ------------------ tw/packages/games.scm | 25 +++++++++++++------------ 2 files changed, 13 insertions(+), 30 deletions(-) delete mode 100644 tw/packages/files/simutrans-paths.patch (limited to 'tw/packages') diff --git a/tw/packages/files/simutrans-paths.patch b/tw/packages/files/simutrans-paths.patch deleted file mode 100644 index bfc0db4a..00000000 --- a/tw/packages/files/simutrans-paths.patch +++ /dev/null @@ -1,18 +0,0 @@ -This patch stores user-specific config in $XDG_CONFIG_HOME/simutrans -rather than ~/simutrans. - ---- a/sys/simsys.cc 2022-09-25 01:36:18.951636483 +0200 -+++ b/sys/simsys.cc 2022-09-25 01:36:44.615457050 +0200 -@@ -395,7 +395,11 @@ - #elif defined __ANDROID__ - tstrncpy(buffer,SDL_GetPrefPath("Simutrans Team","simutrans"),lengthof(buffer)); - #else -- sprintf(buffer, "%s/simutrans", getenv("HOME")); -+ if (getenv("XDG_CONFIG_HOME") == NULL) { -+ sprintf(buffer, "%s/.config/simutrans", getenv("HOME")); -+ } else { -+ sprintf(buffer, "%s/simutrans", getenv("XDG_CONFIG_HOME")); -+ } - #endif - - // create directory and subdirectories diff --git a/tw/packages/games.scm b/tw/packages/games.scm index 817570e1..bf9bba17 100644 --- a/tw/packages/games.scm +++ b/tw/packages/games.scm @@ -88,15 +88,14 @@ with the Shenzhen I/O game.") ;; https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/simutrans/default.nix (package (name "simutrans") - (version "123.0.1") + (version "124.0") (source (origin - (method url-fetch/zipbomb) + (method url-fetch) (uri (let ((version/- (string-replace-substring version "." "-"))) (string-append "mirror://sourceforge/simutrans/simutrans/" version/- "/simutrans-src-" version/- ".zip"))) ;; Use `guix hash -H sha256 '. - (sha256 (base32 "0sgl2hrgjd2cyw3fbcvpq29dwf0w2sdlpp8ccic5bys1vv43iswd")) - (patches (list (local-file "files/simutrans-paths.patch"))))) + (sha256 (base32 "08mjmd4wzzx54i5cpbnfp2qpih0rqi7p9qwd05sph9xnky952bz7")))) (build-system gnu-build-system) (arguments `(#:make-flags @@ -130,7 +129,7 @@ with the Shenzhen I/O game.") (copy-recursively "simutrans" data)) ;; Install extra helper files. - (install-file "simutrans.svg" + (install-file "src/simutrans/simutrans.svg" (string-append out "/share/icons/hicolor/scalable/apps")) (install-file #+(local-file "files/simutrans.desktop") (string-append out "/share/applications")) @@ -139,7 +138,7 @@ with the Shenzhen I/O game.") (inputs (list `(,zstd "lib") freetype fluidsynth ; technically optional zlib bzip2 libpng sdl2)) ; required - (native-inputs (list pkg-config)) ; build-time deps + (native-inputs (list pkg-config unzip)) ; build-time deps (home-page "https://www.simutrans.com/") (synopsis "Transportation simulation game") (description "Simutrans is a freeware and open-source transportation @@ -177,17 +176,19 @@ Install a @code{simutrans-with-pak*} package instead.") (install-file "build/default/makeobj/makeobj" (string-append (assoc-ref outputs "out") "/bin"))))))) (inputs (list libpng)) - (native-inputs (list pkg-config)) (synopsis "Addon compiler for Simutrans") (description "@code{makeobj} compiles images and configuration files into addons for the Simutrans game, as @code{.pak} files."))) (define-public simutrans-pak128 - (let ((version "2.8.2") ; last tagged version - (revision "39") ; number of commits since last tagged version - (commit "02ff45afdd3003c258c45aeb3d28b3b25f10172e")) ; latest as of 2023-04-30 + ;; Commit 65c6da8f27d14c4f49b189f95af371dea18ed1ae is probably the release + ;; commit for 2.9, but it's not tagged as such. + ;; Note: needs simutrans >= 124. + (let ((version "2.9") ; last tagged version + (revision "35") ; number of commits since last tagged version + (commit "291913d6109c16b8e49516fcf3ee6a4073910ee7")) ; latest as of 2024-05-18 (package - (name "simutrans-pak128") ; note: needs simutrans >= 123 + (name "simutrans-pak128") (version (git-version version revision commit)) (source (origin (method git-fetch) @@ -195,7 +196,7 @@ addons for the Simutrans game, as @code{.pak} files."))) (url "https://github.com/simutrans/pak128") (commit commit))) (file-name (git-file-name name version)) - (sha256 (base32 "0jg5yc769xrn22wn29ch0nz414xv518cdwkpk6makb14kh6zpdz4")))) + (sha256 (base32 "1ka97ppm3iy3j6afvyxqdsag121bzlqw8n8k0qcp0f5dgx0y6pgp")))) (native-inputs (list simutrans-makeobj zip git)) (build-system gnu-build-system) (arguments -- cgit v1.2.3