about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/emulators/craftos-pc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/emulators/craftos-pc/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/emulators/craftos-pc/default.nix23
1 files changed, 19 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/applications/emulators/craftos-pc/default.nix b/nixpkgs/pkgs/applications/emulators/craftos-pc/default.nix
index b147af8d02b7..9c1c31c689ca 100644
--- a/nixpkgs/pkgs/applications/emulators/craftos-pc/default.nix
+++ b/nixpkgs/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 = ''