From a0fcc849cead8897e0065a53b62c7f6fb8bbd706 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sat, 2 May 2026 00:11:47 +0800 Subject: nongnu: nvidia-vaapi-driver: Move to (nongnu packages nvidia). This is a follow-up to 898fd3ced237b51141cd234bce52817850e3c3ca, which introduced a circular dependency. * nongnu/packages/video.scm (nv-codec-headers, nvidia-vaapi-driver): Move to... * nongnu/packages/nvidia.scm (nv-codec-headers, nvidia-vaapi-driver): ...here. --- nongnu/packages/nvidia.scm | 74 ++++++++++++++++++++++++++++++++++++++++++++++ nongnu/packages/video.scm | 73 --------------------------------------------- 2 files changed, 74 insertions(+), 73 deletions(-) diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm index aa4e4e8..465e385 100644 --- a/nongnu/packages/nvidia.scm +++ b/nongnu/packages/nvidia.scm @@ -1465,6 +1465,80 @@ configuration, application profiles, GPU monitoring and more.") "/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json" "/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json"))))))))))) +(define-public nv-codec-headers + (package + (name "nv-codec-headers") + (version "13.0.19.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git") + (commit (string-append "n" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "01p6bjbgm6hfc1snf0hw63b7f7hif40v7bb1xn84ic3cww2m2fcw")))) + (arguments + (list + #:tests? #f ;No tests. + #:make-flags + #~(list (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "include/ffnvcodec/dynlink_loader.h" + (("lib.*\\.so\\.." lib) + (search-input-file inputs (string-append "lib/" lib))))))))) + (build-system gnu-build-system) + (inputs (list nvidia-driver)) + (home-page "https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git") + (synopsis + "FFmpeg version of headers required to interface with NVIDIA's codec APIs") + (description + "This package provides the necessary headers for interfacing with NVIDIA's +codec APIs.") + (license license-gnu:expat))) + +(define-public nvidia-vaapi-driver + (package + (name "nvidia-vaapi-driver") + (version "0.0.13") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/elFarto/nvidia-vaapi-driver") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1ycrik4sdiy14miqvin5vg79776p7p2pazm0s8la4kngbgss1qr9")))) + (build-system meson-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-install-path + (lambda _ + (substitute* "meson.build" + (("(nvidia_install_dir = ).*" _ prefix) + (format #f "~a'~a/lib/dri'" prefix #$output)))))))) + (native-inputs (list pkg-config)) + (inputs (list libva mesa nv-codec-headers)) + ;; XXX Because of , we need to add + ;; this to all VA-API back ends instead of once to libva. + (native-search-paths + (list (search-path-specification + (variable "LIBVA_DRIVERS_PATH") + (files '("lib/dri"))))) + (home-page "https://github.com/elFarto/nvidia-vaapi-driver") + (synopsis "VA-API implemention using NVIDIA's NVDEC.") + (description + "This is an VA-API implementation that uses NVDEC as a backend, +specifically designed to be used by Firefox for accelerated decoding of web +content.") + (license license-gnu:expat))) + ;; nvda is used as a name because it has the same length as mesa which is ;; required for grafting (define (make-nvda driver) diff --git a/nongnu/packages/video.scm b/nongnu/packages/video.scm index 8512a9a..817e547 100644 --- a/nongnu/packages/video.scm +++ b/nongnu/packages/video.scm @@ -141,79 +141,6 @@ video decode capabilities of supported Intel GPUs.")))) "Audio and video player (with hardware acceleration for NVIDIA graphics \ cards)"))) -(define-public nv-codec-headers - (package - (name "nv-codec-headers") - (version "13.0.19.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git") - (commit (string-append "n" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "01p6bjbgm6hfc1snf0hw63b7f7hif40v7bb1xn84ic3cww2m2fcw")))) - (arguments - (list - #:tests? #f ; No tests. - #:make-flags #~(list (string-append "PREFIX=" #$output)) - #:phases #~(modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'fix-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "include/ffnvcodec/dynlink_loader.h" - (("lib.*\\.so\\.." lib) - (search-input-file - inputs (string-append "lib/" lib))))))))) - (build-system gnu-build-system) - (inputs (list nvidia-driver)) - (home-page "https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git") - (synopsis - "FFmpeg version of headers required to interface with NVIDIA's codec APIs") - (description - "This package provides the necessary headers for interfacing with NVIDIA's -codec APIs.") - (license license:expat))) - -(define-public nvidia-vaapi-driver - (package - (name "nvidia-vaapi-driver") - (version "0.0.13") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/elFarto/nvidia-vaapi-driver") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1ycrik4sdiy14miqvin5vg79776p7p2pazm0s8la4kngbgss1qr9")))) - (build-system meson-build-system) - (arguments - (list #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'fix-install-path - (lambda _ - (substitute* "meson.build" - (("(nvidia_install_dir = ).*" _ prefix) - (format #f "~a'~a/lib/dri'" prefix #$output)))))))) - (native-inputs (list pkg-config)) - (inputs (list libva mesa nv-codec-headers)) - ;; XXX Because of , we need to add - ;; this to all VA-API back ends instead of once to libva. - (native-search-paths - (list (search-path-specification - (variable "LIBVA_DRIVERS_PATH") - (files '("lib/dri"))))) - (home-page "https://github.com/elFarto/nvidia-vaapi-driver") - (synopsis "VA-API implemention using NVIDIA's NVDEC.") - (description - "This is an VA-API implementation that uses NVDEC as a backend, -specifically designed to be used by Firefox for accelerated decoding of web -content.") - (license license:expat))) - (define-public obs-nvidia (package/inherit obs (name "obs-nvidia") -- cgit v1.3