Merge pull request #280337 from r-ryantm/auto-update/imgui

imgui: 1.90 -> 1.90.1
This commit is contained in:
Weijia Wang 2024-01-21 23:47:44 +01:00 committed by GitHub
commit 6616e3bee4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -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;

View File

@ -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;
};
}