diff mbox series

[bug#56959,v2] gnu: packages: Add glad2.

Message ID 20220812065958.2469-1-paren@disroot.org
State New
Headers show
Series [bug#56959,v2] gnu: packages: Add glad2. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

\( Aug. 12, 2022, 6:59 a.m. UTC
* gnu/packages/gl.scm (glad2): New variable.
---
 gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index c740c087dd..50c7b91526 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -17,6 +17,7 @@ 
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
 ;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2022 ( <paren@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -66,6 +67,7 @@  (define-module (gnu packages gl)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (guix build-system waf)
+  #:use-module (guix gexp)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -215,6 +217,50 @@  (define-public glad
 generate a GL/GLES/EGL/GLX/WGL loader tailored for specific requirements.")
     (license license:expat)))
 
+(define-public glad2
+  (let ((commit "b1051403cf81b984f9fc11cc5916adb5afd34766")
+	(revision "2"))
+    (package
+      (name "glad2")
+      (version (git-version "0.1.36" revision commit))
+      (source (origin
+	       (method git-fetch)
+	       (uri (git-reference
+		     (url "https://github.com/Dav1dde/glad")
+		     (commit commit)))
+	       (sha256
+	        (base32
+                 "03q3gxg2z9lpx7hqac2fd3ld94avhkg4mdxjfjgrgh97kyx9knpm"))))
+      (build-system python-build-system)
+      (arguments
+       (list #:phases
+             #~(modify-phases %standard-phases
+                 (add-after 'install 'install-cmake-plugin
+                   (lambda _
+                     (let ((cmake-dir (string-append #$output
+                                                     "/share/cmake/glad")))
+                       (mkdir-p cmake-dir)
+                       (copy-file "cmake/CMakeLists.txt"
+                                  (string-append cmake-dir
+                                                 "/glad.cmake"))))))))
+      (inputs (list python-jinja2))
+      (home-page "https://glad.sh")
+      (synopsis "Multi-language OpenGL/Vulkan loader generator")
+      (description
+       "GLAD 2 is a graphics library binding generator.  It generates code
+for calling into Vulkan and GL-related APIs from the official Khronos XML
+specifications.  Among the improvements are:
+@enumerate
+@item Better EGL, GLX, and WGL support
+@item Support for generating Vulkan bindings
+@item A Rust frontend
+@item More generator options for enabling features such as the generation
+of header-only C bindings
+@item Improvements for CMake support
+@item Better API
+@end enumerate")
+      (license license:expat))))
+
 (define-public s2tc
   (package
     (name "s2tc")