Skip to content

Commit

Permalink
Merge pull request NixOS#289867 from qubitnano/origin-cemu-imgui
Browse files Browse the repository at this point in the history
cemu: 2.0-65 -> 2.0-66, pin imgui 1.90.1
  • Loading branch information
marsam authored Mar 3, 2024
2 parents 52fd6a4 + 3ab1bb1 commit ad46e10
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions pkgs/applications/emulators/cemu/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib, stdenv, fetchFromGitHub
, fetchpatch
, addOpenGLRunpath
, wrapGAppsHook
, cmake
Expand Down Expand Up @@ -32,29 +31,35 @@
, 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";
version = "2.0-66";

src = fetchFromGitHub {
owner = "cemu-project";
repo = "Cemu";
rev = "v${version}";
hash = "sha256-jsDmxol3zZMmpo4whDeUXTzfO+QVK/h6lItXTyJyoak=";
hash = "sha256-1s1H2rJuN9lRNanKXxKWMLBOFg5z3IwpJCZCmymAH9Y=";
};

patches = [
# glslangTargets want SPIRV-Tools-opt to be defined:
# > 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 = [
Expand All @@ -75,7 +80,7 @@ stdenv.mkDerivation rec {
glm
gtk3
hidapi
imgui
imgui'
libpng
libusb1
libzip
Expand Down Expand Up @@ -103,7 +108,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"
'';
Expand Down

0 comments on commit ad46e10

Please sign in to comment.