From af911e9b2c37eddc015344c85fb426a45e146d40 Mon Sep 17 00:00:00 2001 From: Murilo Date: Thu, 19 Sep 2024 22:58:56 -0300 Subject: [PATCH] nongnu: Add nv-codec-headers. * nongnu/packages/video.scm (nv-codec-headers): New variable. Signed-off-by: Hilton Chain --- nongnu/packages/video.scm | 40 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/nongnu/packages/video.scm b/nongnu/packages/video.scm index e5af3a1..8c7fa1b 100644 --- a/nongnu/packages/video.scm +++ b/nongnu/packages/video.scm @@ -1,18 +1,21 @@ ;;; SPDX-License-Identifier: GPL-3.0-or-later ;;; Copyright © 2022 Jelle Licht ;;; Copyright © 2024 Oleg Pykhalov +;;; Copyright © 2024 Murilo (define-module (nongnu packages video) #:use-module (gnu packages pkg-config) #:use-module (gnu packages video) #:use-module (guix build utils) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) - #:use-module (nongnu packages chromium)) + #:use-module (nongnu packages chromium) + #:use-module (nongnu packages nvidia)) (define-public gmmlib (package @@ -95,6 +98,41 @@ graphics hardware.") " This build of intel-media-driver includes nonfree blobs to fully enable the video decode capabilities of supported Intel GPUs.")))) +(define-public nv-codec-headers + (package + (name "nv-codec-headers") + (version "12.1.14.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 "0sp4giwbhai9blgd2k7sb571xwmz2yx17w32vy0nyj86ccb2x5jq")))) + (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 obs-with-cef (package (inherit obs)