Last active
June 4, 2021 15:14
-
-
Save mbakke/e969c521f5c19aa43e63f2be26020a10 to your computer and use it in GitHub Desktop.
Guix manifest with vendor-neutral OpenGL dispatch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This is a proof-of-concept and does not actually work (yet!). | |
;; The idea is that 'guix environment --ad-hoc -m vngl.scm -- glxgears' should | |
;; succeed even on unsupported graphics drivers, using the "foreign" libGL. | |
(use-modules (guix packages) | |
(guix utils) | |
(gnu packages gl)) | |
(define vendor-neutral-mesa | |
(package/inherit mesa | |
(propagated-inputs | |
`(("libglvnd" ,libglvnd) | |
,@(package-propagated-inputs mesa))) | |
(arguments | |
(substitute-keyword-arguments (package-arguments mesa) | |
((#:configure-flags flags) | |
`(cons "-Dglvnd=true" ,flags)))))) | |
(define with-vendor-neutral-mesa | |
(package-input-rewriting `((,mesa . ,vendor-neutral-mesa)))) | |
(packages->manifest | |
(list (with-vendor-neutral-mesa mesa-utils))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment