From 20b99b975998eb39a9aa8ca2cecd088db1901f23 Mon Sep 17 00:00:00 2001 From: "Alexander V. Nikolaev" Date: Sun, 5 May 2024 16:51:00 +0300 Subject: [PATCH] fallout-ce: Fix broken game load/save due to case sensitive filesystem (fix fallout2-ce as well) --- pkgs/games/fallout-ce/build.nix | 3 ++- pkgs/games/fallout-ce/fallout-ce.nix | 9 +++++++++ pkgs/games/fallout-ce/fallout2-ce.nix | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pkgs/games/fallout-ce/build.nix b/pkgs/games/fallout-ce/build.nix index c220895db08c..74d2e706324a 100644 --- a/pkgs/games/fallout-ce/build.nix +++ b/pkgs/games/fallout-ce/build.nix @@ -7,6 +7,7 @@ , extraBuildInputs ? [ ] , extraMeta +, patches , pname , version , src @@ -45,7 +46,7 @@ let ''; in stdenv.mkDerivation { - inherit pname version src; + inherit pname version src patches; nativeBuildInputs = [ cmake ]; buildInputs = [ SDL2 ] ++ extraBuildInputs; diff --git a/pkgs/games/fallout-ce/fallout-ce.nix b/pkgs/games/fallout-ce/fallout-ce.nix index 2f229fdf7380..c1b77d25b610 100644 --- a/pkgs/games/fallout-ce/fallout-ce.nix +++ b/pkgs/games/fallout-ce/fallout-ce.nix @@ -1,5 +1,6 @@ { callPackage , fetchFromGitHub +, fetchpatch2 }: callPackage ./build.nix rec { @@ -13,6 +14,14 @@ callPackage ./build.nix rec { hash = "sha256-ZiBoF3SL00sN0QrD3fkWG9SAknumOvzRB1oQJff6ITA="; }; + patches = [ + # Fix case-sensitive filesystems issue when save/load games + (fetchpatch2 { + url = "https://github.com/alexbatalov/fallout1-ce/commit/aa3c5c1e3e3f9642d536406b2d8d6b362c9e402f.patch"; + sha256 = "sha256-quFRbKMS2pNDCNTWc1ZoB3jnB5qzw0b+2OeJUi8IPBc="; + }) + ]; + extraMeta = { description = "A fully working re-implementation of Fallout, with the same original gameplay, engine bugfixes, and some quality of life improvements"; homepage = "https://github.com/alexbatalov/fallout1-ce"; diff --git a/pkgs/games/fallout-ce/fallout2-ce.nix b/pkgs/games/fallout-ce/fallout2-ce.nix index 6d665c96a0e2..de73fd239921 100644 --- a/pkgs/games/fallout-ce/fallout2-ce.nix +++ b/pkgs/games/fallout-ce/fallout2-ce.nix @@ -1,5 +1,6 @@ { callPackage , fetchFromGitHub +, fetchpatch2 , zlib }: @@ -14,6 +15,14 @@ callPackage ./build.nix rec { hash = "sha256-r1pnmyuo3uw2R0x9vGScSHIVNA6t+txxABzgHkUEY5U="; }; + patches = [ + # Fix case-sensitive filesystems issue when save/load games + (fetchpatch2 { + url = "https://github.com/alexbatalov/fallout2-ce/commit/d843a662b3ceaf01ac363e9abb4bfceb8b805c36.patch"; + sha256 = "sha256-u4E9+DE6sGYikIGwKDmSBj3ErCfIo6YzIw2eMiqXw/E="; + }) + ]; + extraBuildInputs = [ zlib ]; extraMeta = {