diff options
| author | Hilton Chain <hako@ultrarare.space> | 2025-02-25 05:52:39 +0800 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2025-02-28 08:28:43 +0800 |
| commit | 87c5b727d82bd4e9179a3f66c58b983a3bf8478d (patch) | |
| tree | df8dc50594d986c971112ad66e7631080230f5a8 | |
| parent | 1a3acd8e726b35dcc39bf9c306385114993ad8bb (diff) | |
nongnu: nvda: Include nvidia-vaapi-driver.
* nongnu/packages/nvidia.scm (nvda)[inputs]: Add nvidia-vaapi-driver.
[arguments]<#:builder>: Include it.
[native-search-paths]: Add its search path.
(nvdb): Define with transformation.
| -rw-r--r-- | nongnu/packages/nvidia.scm | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm index 03d2a2a..39a52bc 100644 --- a/nongnu/packages/nvidia.scm +++ b/nongnu/packages/nvidia.scm | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | #:use-module (gnu packages xml) | 50 | #:use-module (gnu packages xml) |
| 51 | #:use-module (gnu packages xorg) | 51 | #:use-module (gnu packages xorg) |
| 52 | #:use-module (nongnu packages linux) | 52 | #:use-module (nongnu packages linux) |
| 53 | #:use-module (nongnu packages video) | ||
| 53 | #:use-module (ice-9 match)) | 54 | #:use-module (ice-9 match)) |
| 54 | 55 | ||
| 55 | (define-public %nvidia-environment-variable-regexps | 56 | (define-public %nvidia-environment-variable-regexps |
| @@ -806,7 +807,8 @@ configuration, creating application profiles, gpu monitoring and more.") | |||
| 806 | #$output | 807 | #$output |
| 807 | '#$(list (this-package-input "libglvnd") | 808 | '#$(list (this-package-input "libglvnd") |
| 808 | (this-package-input "mesa") | 809 | (this-package-input "mesa") |
| 809 | (this-package-input "nvidia-driver")))))) | 810 | (this-package-input "nvidia-driver") |
| 811 | (this-package-input "nvidia-vaapi-driver")))))) | ||
| 810 | (native-search-paths | 812 | (native-search-paths |
| 811 | (list | 813 | (list |
| 812 | ;; https://github.com/NVIDIA/egl-wayland/issues/39 | 814 | ;; https://github.com/NVIDIA/egl-wayland/issues/39 |
| @@ -821,6 +823,11 @@ configuration, creating application profiles, gpu monitoring and more.") | |||
| 821 | (search-path-specification | 823 | (search-path-specification |
| 822 | (variable "GBM_BACKENDS_PATH") | 824 | (variable "GBM_BACKENDS_PATH") |
| 823 | (files '("lib/gbm"))) | 825 | (files '("lib/gbm"))) |
| 826 | ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add | ||
| 827 | ;; this to all VA-API back ends instead of once to libva. | ||
| 828 | (search-path-specification | ||
| 829 | (variable "LIBVA_DRIVERS_PATH") | ||
| 830 | (files '("lib/dri"))) | ||
| 824 | (search-path-specification | 831 | (search-path-specification |
| 825 | (variable "VDPAU_DRIVER_PATH") | 832 | (variable "VDPAU_DRIVER_PATH") |
| 826 | (files '("lib/vdpau")) | 833 | (files '("lib/vdpau")) |
| @@ -847,34 +854,20 @@ variables @code{__GLX_VENDOR_LIBRARY_NAME=nvidia} and | |||
| 847 | (append | 854 | (append |
| 848 | (package-propagated-inputs mesa-for-nvda) | 855 | (package-propagated-inputs mesa-for-nvda) |
| 849 | (package-propagated-inputs nvidia-driver))) | 856 | (package-propagated-inputs nvidia-driver))) |
| 850 | (inputs (list mesa-for-nvda nvidia-driver)) | 857 | (inputs (list mesa-for-nvda nvidia-driver nvidia-vaapi-driver)) |
| 851 | (outputs '("out")) | 858 | (outputs '("out")) |
| 852 | (license (package-license nvidia-driver)) | 859 | (license (package-license nvidia-driver)) |
| 853 | (home-page (package-home-page nvidia-driver)))) | 860 | (home-page (package-home-page nvidia-driver)))) |
| 854 | 861 | ||
| 855 | (define-public nvdb | 862 | (define-public nvdb |
| 856 | (package | 863 | ((package-input-rewriting `((,nvidia-driver . ,nvidia-driver-beta))) |
| 857 | (inherit nvda) | 864 | (package |
| 858 | (name "nvdb") | 865 | (inherit nvda) |
| 859 | (version (string-pad-right | 866 | (name "nvdb") |
| 860 | (package-version nvidia-driver-beta) | 867 | (version (string-pad-right |
| 861 | (string-length (package-version mesa-for-nvda)) | 868 | (package-version nvidia-driver-beta) |
| 862 | #\0)) | 869 | (string-length (package-version mesa-for-nvda)) |
| 863 | (arguments | 870 | #\0))))) |
| 864 | (list #:modules '((guix build union)) | ||
| 865 | #:builder | ||
| 866 | #~(begin | ||
| 867 | (use-modules (guix build union)) | ||
| 868 | (union-build | ||
| 869 | #$output | ||
| 870 | '#$(list (this-package-input "libglvnd") | ||
| 871 | (this-package-input "mesa") | ||
| 872 | (this-package-input "nvidia-driver-beta")))))) | ||
| 873 | (propagated-inputs | ||
| 874 | (append | ||
| 875 | (package-propagated-inputs mesa-for-nvda) | ||
| 876 | (package-propagated-inputs nvidia-driver-beta))) | ||
| 877 | (inputs (list mesa-for-nvda nvidia-driver-beta)))) | ||
| 878 | 871 | ||
| 879 | (define mesa/fake | 872 | (define mesa/fake |
| 880 | (package | 873 | (package |
