From e23d5aa908cb8864e3efc0c053aad74f995b5965 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 14 Nov 2020 22:11:41 +0100 Subject: [PATCH] gnu: Add dear-imgui. * gnu/packages/graphics.scm (dear-imgui): New public variable. --- gnu/packages/graphics.scm | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index d0bf577139..189ed94a54 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -90,6 +90,7 @@ (define-module (gnu packages graphics) #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages sdl) + #:use-module (gnu packages stb) #:use-module (gnu packages swig) #:use-module (gnu packages tbb) #:use-module (gnu packages upnp) @@ -855,6 +856,78 @@ (define-public pstoedit @end itemize") (license license:gpl2+))) +(define-public dear-imgui + (package + (name "dear-imgui") + (version "1.79") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ocornut/imgui") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "CC=" ,(cc-for-target)) + (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "VERSION=" ,version)) + #:tests? #f ; no test suite + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-debian-files + (lambda* (#:key inputs #:allow-other-keys) + (invoke "tar" "xvf" (assoc-ref inputs "debian-files")) + (apply invoke "patch" "-Np1" "-i" + (find-files "debian/patches" "\\.patch$")) + (substitute* "Makefile" + (("