about summary refs log tree commit diff
path: root/pkgs/applications/emulators/craftos-pc/default.nix
diff options
context:
space:
mode:
authorTomo <68489118+Tomodachi94@users.noreply.github.com>2024-01-02 22:42:21 -0800
committerTomo <68489118+Tomodachi94@users.noreply.github.com>2024-01-03 16:11:48 -0800
commit436f194a7659efa62ac6f7cba57803c531f5d79d (patch)
tree99653bb9443b69731a5fc9bda29ce7d4e655b088 /pkgs/applications/emulators/craftos-pc/default.nix
parent86d4d1ad174b228b0a56e639b20abc11bc30ac0b (diff)
craftos-pc: 2.7.5 -> 2.8
Changelog: https://github.com/MCJack123/craftos2/releases/tag/v2.8

This release contains several breaking changes, and should **not** be backported.
Diffstat (limited to 'pkgs/applications/emulators/craftos-pc/default.nix')
-rw-r--r--pkgs/applications/emulators/craftos-pc/default.nix23
1 files changed, 19 insertions, 4 deletions
diff --git a/pkgs/applications/emulators/craftos-pc/default.nix b/pkgs/applications/emulators/craftos-pc/default.nix
index b147af8d02b76..9c1c31c689caf 100644
--- a/pkgs/applications/emulators/craftos-pc/default.nix
+++ b/pkgs/applications/emulators/craftos-pc/default.nix
@@ -16,17 +16,17 @@
 }:
 
 let
-  version = "2.7.5";
+  version = "2.8";
   craftos2-lua = fetchFromGitHub {
     owner = "MCJack123";
     repo = "craftos2-lua";
     rev = "v${version}";
-    hash = "sha256-JMBsSoO/yTLw7K1Ri3BzKr5bz5UirXiPr/Q0YoMumhY=";
+    hash = "sha256-xuNcWt3Wnh3WlYe6pB4dvP3PY9S5ghL9QQombGn8iyY=";
   };
   craftos2-rom = fetchFromGitHub {
     owner = "McJack123";
     repo = "craftos2-rom";
-    rev = "v${version}.1"; # Author released a hotfix; remove trailing '.1' on next update
+    rev = "v${version}";
     hash = "sha256-WZs/KIdpqLLzvpH2hiJpe/AehluoQMtewBbAb4htz8k=";
   };
 in
@@ -39,9 +39,18 @@ stdenv.mkDerivation rec {
     owner = "MCJack123";
     repo = "craftos2";
     rev = "v${version}";
-    hash = "sha256-t2yhSuNPFCF2NaQFWuN9Nos5ZPinAvecV6EZNO0Cy9I=";
+    hash = "sha256-nT/oN2XRU1Du1/IHlkRCzLqFwQ5s9Sr4FQs3ES+aPFs=";
   };
 
+  patches = [
+    ( # Fixes CCEmuX. This is a one-character change that did not make it into the release.
+      fetchpatch {
+        url = "https://github.com/MCJack123/craftos2/commit/9ef7e16b69ead69b5fe076724842a1e24b3de058.patch";
+        hash = "sha256-SjNnsooDFt3JoVOO0xf6scrGXEQQmrQf91GY7VWaTOw=";
+      }
+    )
+  ];
+
   buildInputs = [ patchelf poco openssl SDL2 SDL2_mixer ncurses libpng pngpp libwebp ];
 
   preBuild = ''
@@ -50,6 +59,12 @@ stdenv.mkDerivation rec {
     make -C craftos2-lua linux
   '';
 
+  buildPhase = ''
+    runHook preBuild
+    make
+    runHook postBuild
+  '';
+
   dontStrip = true;
 
   installPhase = ''