From 436ade14bb5b715d5679376ebaa5e2fc10fcf817 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 11 Jan 2024 19:42:04 +0000 Subject: [PATCH 1/2] imgui: 1.90 -> 1.90.1 --- pkgs/development/libraries/imgui/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/imgui/default.nix b/pkgs/development/libraries/imgui/default.nix index 73bc80ef9d5b..79186d9149f7 100644 --- a/pkgs/development/libraries/imgui/default.nix +++ b/pkgs/development/libraries/imgui/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "imgui"; - version = "1.90"; + version = "1.90.1"; src = fetchFromGitHub { owner = "ocornut"; repo = "imgui"; rev = "v${version}"; - sha256 = "sha256-rJMWCPVhho34NcPvJZaB5d6EbZkJyLXEfeotplOOaiA="; + sha256 = "sha256-gf47uLeNiXQic43buB5ZnMqiotlUfIyAsP+3H7yJuFg="; }; dontBuild = true; From 826093c6f1f2bf7d1b58e468462e287e66fb8c3c Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 20 Jan 2024 21:22:56 +0100 Subject: [PATCH 2/2] imtui: add patch for imgui 1.90.1 --- pkgs/development/libraries/imtui/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/imtui/default.nix b/pkgs/development/libraries/imtui/default.nix index e534a55ae5a4..86b488c1a888 100644 --- a/pkgs/development/libraries/imtui/default.nix +++ b/pkgs/development/libraries/imtui/default.nix @@ -8,6 +8,7 @@ , withCurl ? (!withEmscripten), curl , withNcurses ? (!withEmscripten), ncurses , static ? withEmscripten +, darwin }: stdenv.mkDerivation rec { @@ -25,10 +26,14 @@ stdenv.mkDerivation rec { buildInputs = lib.optional withEmscripten emscripten ++ lib.optional withCurl curl - ++ lib.optional withNcurses ncurses; + ++ lib.optional withNcurses ncurses + ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa; postPatch = '' cp -r ${imgui}/include/imgui third-party/imgui + '' + lib.optionalString (lib.versionAtLeast imgui.version "1.90.1") '' + substituteInPlace src/imtui-impl-{emscripten,ncurses}.cpp \ + --replace "ImGuiKey_KeyPadEnter" "ImGuiKey_KeypadEnter" ''; cmakeFlags = [ @@ -54,5 +59,6 @@ stdenv.mkDerivation rec { changelog = "https://github.com/ggerganov/imtui/blob/${src.rev}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ azahi ]; + platforms = platforms.unix; }; }