diff options
| author | Simen Endsjø <contact@simendsjo.me> | 2025-09-12 10:57:22 +0200 |
|---|---|---|
| committer | jgart <jgart@dismail.de> | 2025-10-07 20:48:25 -0500 |
| commit | dc49d6d8c760b6f36c675f9789d8cebb4fca0350 (patch) | |
| tree | 49a0b3b77c912155375ab80fa7d7f4764342b360 /gnu | |
| parent | c98af4b77ae81bce097ceb09187f4cc5122a1a8e (diff) | |
gnu: Add raygui.
* gnu/packages/game-development.scm (raygui): New variable.
Change-Id: I8e8fe2cadc71e268568eee4b5a91c8abcf01c373
Signed-off-by: jgart <jgart@dismail.de>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/game-development.scm | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 2f8da3c67eb..f3a6145446d 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -37,6 +37,7 @@ ;;; Copyright © 2025 宋文武 <iyzsong@envs.net> ;;; Copyright © 2025 Arnaud Lechevallier <arnaud.lechevallier@free.fr> ;;; Copyright © 2025 Vinicius Monego <monego@posteo.net> +;;; Copyright © 2025 Simen Endsjø <contact@simendsjo.me> ;;; ;;; 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") |
