Subject: [bug#56576] [PATCH] gnu: Add nuklear.

From: Antero Mejr <[email-masked]>
Date: Fri, 15 Jul 2022 14:57:35 +0000

* gnu/packages/c.scm (nuklear): New variable.
---
 gnu/packages/c.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index b1f68c706b..61bc1f13dc 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -1219,3 +1219,38 @@ (define-public utest-h
       (description
        "This package provides a header-only unit testing library for C/C++.")
       (license license:unlicense))))
+
+(define-public nuklear
+  (package
+    (name "nuklear")
+    (version "4.9.6")
+    (home-page "https://github.com/Immediate-Mode-UI/Nuklear")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "18hvrmynycv5msc20f5v4drgapbig85s67iqq6k87n9l816zi1qg"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:tests? #f ;no tests
+           #:phases #~(modify-phases %standard-phases
+                        (delete 'configure)
+                        (replace 'build
+                          (lambda _
+                            (with-directory-excursion "src"
+                                                      (invoke "./paq.sh"))))
+                        (replace 'install
+                          (lambda* (#:key outputs #:allow-other-keys)
+                            (install-file "nuklear.h"
+                                          (string-append #$output "/include")))))))
+    (synopsis "Graphical user interface toolkit written in ANSI C")
+    (description "This package provides an immediate-mode graphical user
+interface toolkit.  It was designed as an embeddable user interface
+for applications and does not have any dependencies, a default render backend
+or OS window/input handling.  The library is self contained in one single header
+file and can be used either in header only mode or in implementation mode.")
+    (license (list license:unlicense license:expat))))
-- 
2.36.1