Subject: [bug#76298] [PATCH] gnu: Add ssgl.

From: Andy Tai <[email-masked]>
Date: Fri, 14 Feb 2025 18:07:33 -0800

* gnu/packages/graphics.scm (ssgl): New variable.

Change-Id: Id095aea976b09e82a6da96b82f4ef43246b156b5
---
 gnu/packages/graphics.scm | 47 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index df2d287eb8..7af85623f1 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -3128,6 +3128,53 @@ (define-public f3d
 options.")
     (license license:bsd-3)))
 
+(define-public ssgl
+  (let ((commit "4d3f2977620be74782a6523fc950e98c0b7f69bb")
+        (revision "0"))
+    (package
+      (name "ssgl")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/msqrt/ssgl.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "094akz0gzbr0mswyiqxm74flkvqqg147n9vcmp3grbksxvk37abv"))))
+
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:tests? #f ;there are no tests
+        #:phases #~(modify-phases %standard-phases
+                     (delete 'configure)
+                     (delete 'build)
+
+                     (replace 'install
+                       (lambda _
+                         (for-each (lambda (f)
+                                     (install-file f
+                                                   (string-append #$output
+                                                                  "/include")))
+                                   (find-files "impl" "\\.h$")))))))
+      (inputs (list mesa
+                    mesa-headers
+                    freeglut
+                    libxi
+                    libxmu
+                    libpng))
+      (home-page "https://github.com/msqrt/ssgl")
+      (synopsis "Single source shaders for opengl ")
+      (description
+       "single source gl (ssgl) lets you write GLSL shaders as C++ lambdas that
+automatically capture shader inputs and outputs. This unifies code, bring
+powerful C++ tools into shader development, and removes code that just passes
+objects around. All of this makes it extremely fast to prototype ideas and
+iterate on them.")
+      (license license:expat))))
+
 (define-public gpaint
   (package
     (name "gpaint")

base-commit: 9b1fe3bd70a57cdbf99339eb06b3a9b57f060f97
-- 
2.34.1