summary refs log tree commit diff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorSimon Tournier <zimon.toutoune@gmail.com>2023-09-15 17:48:42 +0200
committerSimon Tournier <zimon.toutoune@gmail.com>2023-09-22 15:04:01 +0200
commit5bae1fea205070a44bcf5f3caec8afa8d3b1a4c0 (patch)
tree9af6965e194d97ead281e705f1a5ad720c19f64e /gnu/packages/python-xyz.scm
parent3a7a81b4712a76dd40699bc0940ac366680f053a (diff)
downloadguix-5bae1fea205070a44bcf5f3caec8afa8d3b1a4c0.tar.gz
gnu: python-glcontext: Update to 2.4.0-0.beebc1f.
* gnu/packages/python-xyz.scm (python-glcontext): Explicitly refer to commit
instead of mutable Git tag.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm100
1 files changed, 52 insertions, 48 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 82806222d7..319ccd2ae5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23051,55 +23051,59 @@ library.")
      "This is the Cython-coded accelerator module for PyOpenGL.")))
 
 (define-public python-glcontext
-  (package
-    (name "python-glcontext")
-    (version "2.4.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/moderngl/glcontext")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0zzpwyqg19y600n09xz07cxk4jimh9vjraszda7g7ipijq6iasac"))))
-    (build-system pyproject-build-system)
-    (arguments
-     (list #:phases #~(modify-phases %standard-phases
-                        (add-before 'build 'fix-lib-paths
-                          (lambda* (#:key inputs outputs #:allow-other-keys)
-                            (let ((mesa (assoc-ref inputs "mesa"))
-                                  (libx11 (assoc-ref inputs "libx11")))
-                              (substitute* '("glcontext/x11.cpp"
-                                             "glcontext/egl.cpp")
-                                (("\"libGL.so\"")
-                                 (string-append "\"" mesa "/lib/libGL.so\""))
-                                (("\"libEGL.so\"")
-                                 (string-append "\"" mesa "/lib/libEGL.so\""))
-                                (("\"libX11.so\"")
-                                 (string-append "\"" libx11 "/lib/libX11.so\"")))
-                              (substitute* '("glcontext/__init__.py")
-                                (("find_library\\('GL'\\)")
-                                 (string-append "'" mesa "/lib/libGL.so'"))
-                                (("find_library\\('EGL'\\)")
-                                 (string-append "'" mesa "/lib/libEGL.so'"))
-                                (("find_library\\(\"X11\"\\)")
-                                 (string-append "'" libx11 "/lib/libX11.so'"))))))
-                        (replace 'check
-                          (lambda* (#:key inputs outputs tests?
-                                    #:allow-other-keys)
-                            (when tests?
-                              (system "Xvfb :1 &")
-                              (setenv "DISPLAY" ":1")
-                              (add-installed-pythonpath inputs outputs)
-                              (invoke "pytest" "tests")))))))
-    (inputs (list libx11 mesa))
-    (native-inputs (list xorg-server-for-tests python-pytest python-psutil))
-    (home-page "https://github.com/moderngl/glcontext")
-    (synopsis "Portable OpenGL Context for ModernGL")
-    (description "Python-glcontext is a library providing an OpenGL
+  (let (;; Upstream is known for abusing mutable tag, hence pinpoint the
+        ;; relevant commit.
+        (revision "0")
+        (commit "beebc1fd08ee850f06f4390be4b280824e383074"))
+    (package
+      (name "python-glcontext")
+      (version (git-version "2.4.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/moderngl/glcontext")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0zzpwyqg19y600n09xz07cxk4jimh9vjraszda7g7ipijq6iasac"))))
+      (build-system pyproject-build-system)
+      (arguments
+       (list #:phases #~(modify-phases %standard-phases
+                          (add-before 'build 'fix-lib-paths
+                            (lambda* (#:key inputs outputs #:allow-other-keys)
+                              (let ((mesa (assoc-ref inputs "mesa"))
+                                    (libx11 (assoc-ref inputs "libx11")))
+                                (substitute* '("glcontext/x11.cpp"
+                                               "glcontext/egl.cpp")
+                                  (("\"libGL.so\"")
+                                   (string-append "\"" mesa "/lib/libGL.so\""))
+                                  (("\"libEGL.so\"")
+                                   (string-append "\"" mesa "/lib/libEGL.so\""))
+                                  (("\"libX11.so\"")
+                                   (string-append "\"" libx11 "/lib/libX11.so\"")))
+                                (substitute* '("glcontext/__init__.py")
+                                  (("find_library\\('GL'\\)")
+                                   (string-append "'" mesa "/lib/libGL.so'"))
+                                  (("find_library\\('EGL'\\)")
+                                   (string-append "'" mesa "/lib/libEGL.so'"))
+                                  (("find_library\\(\"X11\"\\)")
+                                   (string-append "'" libx11 "/lib/libX11.so'"))))))
+                          (replace 'check
+                            (lambda* (#:key inputs outputs tests?
+                                      #:allow-other-keys)
+                              (when tests?
+                                (system "Xvfb :1 &")
+                                (setenv "DISPLAY" ":1")
+                                (add-installed-pythonpath inputs outputs)
+                                (invoke "pytest" "tests")))))))
+      (inputs (list libx11 mesa))
+      (native-inputs (list xorg-server-for-tests python-pytest python-psutil))
+      (home-page "https://github.com/moderngl/glcontext")
+      (synopsis "Portable OpenGL Context for ModernGL")
+      (description "Python-glcontext is a library providing an OpenGL
 implementation for ModernGL on multiple platforms.")
-    (license license:expat)))
+      (license license:expat))))
 
 (define-public python-rencode
   (package