130 lines
4.6 KiB
Scheme
130 lines
4.6 KiB
Scheme
(define-module (nongnu packages gl)
|
|
#:use-module (guix build-system gnu)
|
|
#:use-module (gnu packages)
|
|
#:use-module (gnu packages audio)
|
|
#:use-module (gnu packages freedesktop)
|
|
#:use-module (gnu packages gnome)
|
|
#:use-module (gnu packages linux)
|
|
#:use-module (gnu packages toolkits)
|
|
#:use-module (gnu packages graphics)
|
|
#:use-module (gnu packages pulseaudio)
|
|
#:use-module (gnu packages gtk)
|
|
#:use-module (gnu packages autotools)
|
|
#:use-module (gnu packages pkg-config)
|
|
#:use-module (gnu packages python)
|
|
#:use-module (gnu packages xorg)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix gexp)
|
|
#:use-module (guix utils)
|
|
#:use-module (guix transformations)
|
|
#:use-module (gnu packages gl))
|
|
|
|
|
|
(define-public gl-search-path (list
|
|
(search-path-specification
|
|
(variable "__EGL_VENDOR_LIBRARY_DIRS")
|
|
(files '("share/glvnd/egl_vendor.d")))
|
|
(search-path-specification
|
|
(variable "__EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES")
|
|
(files '("share/egl/egl_external_platform.d"))
|
|
(file-pattern ".*\\.json$")
|
|
(file-type 'regular))
|
|
(search-path-specification
|
|
(variable "VK_ICD_FILENAMES")
|
|
(files '("share/vulkan/icd.d"))
|
|
(file-pattern ".*\\.json$")
|
|
(file-type 'regular))
|
|
(search-path-specification
|
|
(variable "VK_LAYER_PATH")
|
|
(files '("share/vulkan/implicit_layer.d")))
|
|
(search-path-specification
|
|
(variable "VDPAU_DRIVER_PATH")
|
|
(files '("lib/vdpau")))
|
|
(search-path-specification
|
|
(variable "GBM_BACKENDS_PATH")
|
|
(files '("lib/gbm")))
|
|
(search-path-specification
|
|
(variable "GUIX_GL_PATH")
|
|
(files (list "lib/glvnd")))))
|
|
|
|
(define-public libglvnd-glfix
|
|
(package/inherit
|
|
libglvnd
|
|
(name "libglvnd-glfix")
|
|
(source
|
|
(origin
|
|
(inherit (package-source libglvnd))
|
|
(patches
|
|
(parameterize
|
|
((%patch-path
|
|
(map (lambda (directory)
|
|
(string-append directory "/nongnu/packages/patches"))
|
|
%load-path)))
|
|
(search-patches "glvnd.patch")))))))
|
|
|
|
(define-public mesa-glvnd
|
|
(package/inherit
|
|
mesa
|
|
(name "mesa-glvnd")
|
|
(arguments
|
|
(substitute-keyword-arguments (package-arguments mesa)
|
|
((#:configure-flags flags)
|
|
`(cons "-Dglvnd=true" ,flags))
|
|
((#:phases phases)
|
|
#~(modify-phases #$phases
|
|
(add-after 'install 'symlink-glvnd
|
|
(lambda _
|
|
(mkdir-p (string-append #$output "/lib/glvnd"))
|
|
(symlink (string-append #$output "/lib/libGLX_mesa.so.0")
|
|
(string-append #$output "/lib/glvnd/libGLX_mesa.so.0"))))))))
|
|
(propagated-inputs
|
|
`(("libglvnd" ,libglvnd-glfix)
|
|
,@(package-propagated-inputs mesa)))
|
|
(description (string-concatenate (list (package-description mesa) " Glvnd-enabled variant.")))))
|
|
|
|
(define rewrite-input-glvnd (package-input-rewriting `((,mesa . ,mesa-glvnd)
|
|
(,libglvnd . ,libglvnd-glfix))))
|
|
|
|
(define-public (rewrite-glvnd p)
|
|
(package
|
|
(inherit (rewrite-input-glvnd p))
|
|
(name (string-concatenate (list (package-name p) "-glvnd")))
|
|
(description (string-concatenate (list (package-description p) " Glvnd-enabled variant.")))
|
|
(native-search-paths gl-search-path)))
|
|
|
|
(define-public libepoxy-glvnd
|
|
(rewrite-glvnd libepoxy))
|
|
|
|
(define-public mesa-utils-glvnd
|
|
(rewrite-glvnd mesa-utils))
|
|
|
|
(define-public xdg-utils-glvnd
|
|
(rewrite-glvnd xdg-utils))
|
|
|
|
(define-public zenity-glvnd
|
|
(rewrite-glvnd zenity))
|
|
|
|
(define-public alsa-plugins-glvnd
|
|
(rewrite-glvnd alsa-plugins))
|
|
|
|
(define-public imgui-1.86-glvnd
|
|
(rewrite-glvnd imgui-1.86))
|
|
|
|
(define-public mangohud-glvnd
|
|
(rewrite-glvnd mangohud))
|
|
|
|
(define-public openal-glvnd
|
|
(rewrite-glvnd openal))
|
|
|
|
(define-public pulseaudio-glvnd
|
|
(rewrite-glvnd pulseaudio))
|
|
|
|
(define-public gtk+-glvnd
|
|
(rewrite-glvnd gtk+))
|
|
|
|
(define-public gtk+-2-glvnd
|
|
(rewrite-glvnd gtk+-2))
|
|
|
|
(define-public egl-wayland-glvnd
|
|
(rewrite-glvnd egl-wayland))
|