guix_mirror_bot pushed a commit to branch master
in repository guix.
commit dc49d6d8c760b6f36c675f9789d8cebb4fca0350
Author: Simen Endsjø <[email protected]>
AuthorDate: Fri Sep 12 10:57:22 2025 +0200
gnu: Add raygui.
* gnu/packages/game-development.scm (raygui): New variable.
Change-Id: I8e8fe2cadc71e268568eee4b5a91c8abcf01c373
Signed-off-by: jgart <[email protected]>
---
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 2f8da3c67e..f3a6145446 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -37,6 +37,7 @@
;;; Copyright © 2025 宋文武 <[email protected]>
;;; Copyright © 2025 Arnaud Lechevallier <[email protected]>
;;; Copyright © 2025 Vinicius Monego <[email protected]>
+;;; Copyright © 2025 Simen Endsjø <[email protected]>
;;;
;;; 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")