From ca2479d76e3b2407bdc5d9706bd9c53422b84423 Mon Sep 17 00:00:00 2001 From: qubitnano <146656568+qubitnano@users.noreply.github.com> Date: Fri, 1 Mar 2024 18:43:21 -0500 Subject: [PATCH 1/2] cemu: pin imgui 1.90.1 error: 'struct ImGuiIO' has no member named 'ImeWindowHandle' --- pkgs/applications/emulators/cemu/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/emulators/cemu/default.nix b/pkgs/applications/emulators/cemu/default.nix index 055949bb3b75..b20ca77b088e 100644 --- a/pkgs/applications/emulators/cemu/default.nix +++ b/pkgs/applications/emulators/cemu/default.nix @@ -32,7 +32,20 @@ , nix-update-script }: -stdenv.mkDerivation rec { +let + # cemu doesn't build with imgui 1.90.2 or newer: + # error: 'struct ImGuiIO' has no member named 'ImeWindowHandle' + imgui' = imgui.overrideAttrs rec { + version = "1.90.1"; + src = fetchFromGitHub { + owner = "ocornut"; + repo = "imgui"; + rev = "v${version}"; + sha256 = "sha256-gf47uLeNiXQic43buB5ZnMqiotlUfIyAsP+3H7yJuFg="; + }; + }; + +in stdenv.mkDerivation rec { pname = "cemu"; version = "2.0-65"; @@ -75,7 +88,7 @@ stdenv.mkDerivation rec { glm gtk3 hidapi - imgui + imgui' libpng libusb1 libzip @@ -103,7 +116,7 @@ stdenv.mkDerivation rec { tag = last (splitString "-" version); in '' rm -rf dependencies/imgui - ln -s ${imgui}/include/imgui dependencies/imgui + ln -s ${imgui'}/include/imgui dependencies/imgui substituteInPlace src/Common/version.h --replace " (experimental)" "-${tag} (experimental)" substituteInPlace dependencies/gamemode/lib/gamemode_client.h --replace "libgamemode.so.0" "${gamemode.lib}/lib/libgamemode.so.0" ''; From 3ab1bb1414648cf72213843309edd15289f9ec8c Mon Sep 17 00:00:00 2001 From: qubitnano <146656568+qubitnano@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:26:47 -0500 Subject: [PATCH 2/2] cemu: 2.0-65 -> 2.0-66 --- pkgs/applications/emulators/cemu/default.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/emulators/cemu/default.nix b/pkgs/applications/emulators/cemu/default.nix index b20ca77b088e..6e0db9e02c9f 100644 --- a/pkgs/applications/emulators/cemu/default.nix +++ b/pkgs/applications/emulators/cemu/default.nix @@ -1,5 +1,4 @@ { lib, stdenv, fetchFromGitHub -, fetchpatch , addOpenGLRunpath , wrapGAppsHook , cmake @@ -47,13 +46,13 @@ let in stdenv.mkDerivation rec { pname = "cemu"; - version = "2.0-65"; + version = "2.0-66"; src = fetchFromGitHub { owner = "cemu-project"; repo = "Cemu"; rev = "v${version}"; - hash = "sha256-jsDmxol3zZMmpo4whDeUXTzfO+QVK/h6lItXTyJyoak="; + hash = "sha256-1s1H2rJuN9lRNanKXxKWMLBOFg5z3IwpJCZCmymAH9Y="; }; patches = [ @@ -61,13 +60,6 @@ in stdenv.mkDerivation rec { # > The following imported targets are referenced, but are missing: # > SPIRV-Tools-opt ./cmakelists.patch - - # Remove on next release - # https://github.com/cemu-project/Cemu/pull/1076 - (fetchpatch { - url = "https://github.com/cemu-project/Cemu/commit/72aacbdcecc064ea7c3b158c433e4803496ac296.patch"; - hash = "sha256-x+ZVqXgGRSv0VYwJAX35C1p7PnmCHS7iEO+4k8j0/ug="; - }) ]; nativeBuildInputs = [