summaryrefslogtreecommitdiff
path: root/sigils/packages/upstream.scm
diff options
context:
space:
mode:
Diffstat (limited to 'sigils/packages/upstream.scm')
-rw-r--r--sigils/packages/upstream.scm47
1 files changed, 46 insertions, 1 deletions
diff --git a/sigils/packages/upstream.scm b/sigils/packages/upstream.scm
index cad9fd1..caabe79 100644
--- a/sigils/packages/upstream.scm
+++ b/sigils/packages/upstream.scm
@@ -30,7 +30,9 @@
#:use-module (gnu packages file)
#:use-module (gnu packages freedesktop)
;; sdbus
- #:use-module (gnu packages glib))
+ #:use-module (gnu packages glib)
+ ;; pyopengl
+ #:use-module (gnu packages gl))
(define-public mimeo
@@ -179,3 +181,46 @@ information such as the command that it would use, the detected MIME-type, etc."
(description "Udis86 is a disassembler for the x86 and x86-64 class of
instruction set architectures.")
(license license:bsd-2))))
+
+(define-public python-pyopengl
+ (package
+ (name "python-pyopengl")
+ (version "3.1.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "PyOpenGL" version))
+ (sha256
+ (base32
+ "09syrsfrcknr1k2wmj05gfd5d0dyjfxzbipzbd0agv9775vwi9lf"))))
+ (build-system python-build-system)
+ (inputs
+ (list mesa freeglut glu))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* '("OpenGL/platform/ctypesloader.py")
+ (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
+ (substitute* '("OpenGL/platform/glx.py"
+ "OpenGL/platform/egl.py"
+ "OpenGL/platform/osmesa.py"
+ "OpenGL/platform/darwin.py"
+ "tests/check_glut_load.py")
+ (("'GLU'")
+ (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
+ (("'glut',")
+ (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
+ (("'(GL|EGL|GLESv1_CM|GLESv2|OSMesa)'" all gl-library)
+ (string-append "'" (assoc-ref inputs "mesa") (string-append "/lib/lib" gl-library ".so'"))))
+ ;; Not providing libgle. It seems to be very old.
+ #t)))))
+ (home-page "https://pyopengl.sourceforge.net")
+ (synopsis "Standard OpenGL bindings for Python")
+ (description
+ "PyOpenGL is the most common cross platform Python binding to OpenGL and
+related APIs. The binding is created using the standard @code{ctypes}
+library.")
+ (license license:bsd-3)))