From dc49d6d8c760b6f36c675f9789d8cebb4fca0350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Endsj=C3=B8?= Date: Fri, 12 Sep 2025 10:57:22 +0200 Subject: [PATCH] gnu: Add raygui. * gnu/packages/game-development.scm (raygui): New variable. Change-Id: I8e8fe2cadc71e268568eee4b5a91c8abcf01c373 Signed-off-by: jgart --- gnu/packages/game-development.scm | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 2f8da3c67eb7d47d6ff0abf18eb6c345d2bc6b58..f3a6145446d69d178e517a6d89634752235f5593 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -37,6 +37,7 @@ ;;; Copyright © 2025 宋文武 ;;; Copyright © 2025 Arnaud Lechevallier ;;; Copyright © 2025 Vinicius Monego +;;; Copyright © 2025 Simen Endsjø ;;; ;;; This file is part of GNU Guix. ;;; @@ -3686,6 +3687,56 @@ progresses the level, or you may regenerate tiles as the world changes.") (home-page "https://www.raylib.com/") (license license:zlib))) +(define-public raygui + (package + (name "raygui") + (version "4.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/raysan5/raygui/") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "13s606dxnypg6n2pbn13d2d407pxkb7bxqbk5swlfvrcjs2w5afn")))) + (build-system gnu-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'bootstrap) + (add-after 'unpack 'use-raygui-header + (lambda _ + (rename-file "src/raygui.h" "src/raygui.c"))) + (delete 'configure) + (replace 'build + (lambda _ + (invoke #$(cc-for-target) + "-o" "libraygui.so" + "src/raygui.c" + "-DRAYGUI_IMPLEMENTATION" + "-shared" "-fpic" + "-lraylib" + "-lGL" "-lm" "-lpthread" "-ldl" "-lrt" "-lX11"))) + (delete 'check) + (replace 'install + (lambda _ + (let ((src (string-append #$source "/src")) + (inc (string-append #$output "/include")) + (lib (string-append #$output "/lib"))) + (install-file (string-append src "/raygui.h") inc) + (install-file "libraygui.so" lib))))))) + (inputs (list mesa raylib)) + (synopsis "Simple and easy-to-use immediate-mode gui library") + (description "Originally inspired by Unity IMGUI (immediate mode GUI API). + +Designed as an auxiliary module for raylib to create simple GUI interfaces using +raylib graphic style (simple colors, plain rectangular shapes, wide borders...) +but it can be adapted to other engines/frameworks.") + (home-page "https://www.raylib.com") + (license license:zlib))) + (define-public tic80 ;; Use an unreleased version for 'PREFER_SYSTEM_LIBRARIES'. (let ((commit "fcfd7c9862e9157512bcab53affecd592b320131")