Merge pull request #289867 from qubitnano/origin-cemu-imgui

cemu: 2.0-65 -> 2.0-66, pin imgui 1.90.1
This commit is contained in:
Mario Rodas 2024-03-03 11:30:08 -05:00 committed by GitHub
commit ad46e10ce1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,4 @@
{ lib, stdenv, fetchFromGitHub { lib, stdenv, fetchFromGitHub
, fetchpatch
, addOpenGLRunpath , addOpenGLRunpath
, wrapGAppsHook , wrapGAppsHook
, cmake , cmake
@ -32,15 +31,28 @@
, nix-update-script , 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"; pname = "cemu";
version = "2.0-65"; version = "2.0-66";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cemu-project"; owner = "cemu-project";
repo = "Cemu"; repo = "Cemu";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-jsDmxol3zZMmpo4whDeUXTzfO+QVK/h6lItXTyJyoak="; hash = "sha256-1s1H2rJuN9lRNanKXxKWMLBOFg5z3IwpJCZCmymAH9Y=";
}; };
patches = [ patches = [
@ -48,13 +60,6 @@ stdenv.mkDerivation rec {
# > The following imported targets are referenced, but are missing: # > The following imported targets are referenced, but are missing:
# > SPIRV-Tools-opt # > SPIRV-Tools-opt
./cmakelists.patch ./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 = [ nativeBuildInputs = [
@ -75,7 +80,7 @@ stdenv.mkDerivation rec {
glm glm
gtk3 gtk3
hidapi hidapi
imgui imgui'
libpng libpng
libusb1 libusb1
libzip libzip
@ -103,7 +108,7 @@ stdenv.mkDerivation rec {
tag = last (splitString "-" version); tag = last (splitString "-" version);
in '' in ''
rm -rf dependencies/imgui 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 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" substituteInPlace dependencies/gamemode/lib/gamemode_client.h --replace "libgamemode.so.0" "${gamemode.lib}/lib/libgamemode.so.0"
''; '';