unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice via Guix-patches <guix-patches@gnu.org>
To: 36814@debbugs.gnu.org
Subject: [bug#36814] [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide LIBVA_DRIVERS_PATH.
Date: Fri, 26 Jul 2019 20:40:40 +0200	[thread overview]
Message-ID: <20190726184040.31236-1-me@tobias.gr> (raw)
In-Reply-To: <871rydiifr.fsf@nckx>

* gnu/packages/video.scm (intel-vaapi-driver)[native-search-paths]:
Export LIBVA_DRIVERS_PATH when installed.
(libva-without-mesa)[native-search-paths]: Don't inherit any.
---

Guix,

This ties the two together.

I'm leaving the enormocomment in so I don't have to repeat it here, but I'm less sure about it now than when I wrote it.  I thought this was a filthy hack, but maybe it's just mildly unconventional ;-)  The documentation is very sparse indeed.

I don't see any acceptable alternative.

Stormy regards,

T G-R

 gnu/packages/gl.scm    |  3 ++-
 gnu/packages/video.scm | 13 +++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 9ed043c7ae..9495e8ee24 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -219,7 +219,8 @@ also known as DXTn or DXTC) for Mesa.")
         '(#:make-flags)
         (substitute-keyword-arguments (package-arguments libva)
           ((#:configure-flags flags)
-           '(list "--disable-glx" "--disable-egl"))))))))
+           '(list "--disable-glx" "--disable-egl")))))
+      (native-search-paths '()))))
 
 (define-public mesa
   (package
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index b441c5e311..5e26b4c2dc 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2756,6 +2756,19 @@ of modern, widely supported codecs.")
              (let ((out (assoc-ref outputs "out")))
                (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
                #t))))))
+    ;; XXX This variable is actually respected by libva, and in a perfect world
+    ;; would be found there instead.  Unfortunately, native-search-paths are set
+    ;; up only if the package using them is installed directly into the profile.
+    ;; This means that users would need to install libva into their profile for
+    ;; no good reason other than convincing Guix to export the right paths, or
+    ;; that every single one of libva's many dependents would would need to be
+    ;; modified instead (and would still be semantically dubious).  Moving it
+    ;; here is logically (almost) equivalent, and keeps this hack confined to a
+    ;; tiny handful of back-end packages.
+    (native-search-paths
+     (list (search-path-specification
+            (variable "LIBVA_DRIVERS_PATH")
+            (files '("lib/dri")))))
     (home-page "https://01.org/linuxmedia/vaapi")
     (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
     (description
-- 
2.22.0

  parent reply	other threads:[~2019-07-26 18:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  3:27 [bug#36814] [PATCH 0/2] Add VA-API Intel back-end and utilities Tobias Geerinckx-Rice via Guix-patches
2019-07-26  3:30 ` [bug#36814] [PATCH 1/2] gnu: Add intel-vaapi-driver Tobias Geerinckx-Rice via Guix-patches
2019-07-26  3:30   ` [bug#36814] [PATCH 2/2] gnu: Add libva-utils Tobias Geerinckx-Rice via Guix-patches
2019-07-27 18:37     ` Marius Bakke
2019-07-27 18:35   ` [bug#36814] [PATCH 1/2] gnu: Add intel-vaapi-driver Marius Bakke
2019-07-27 19:00     ` Tobias Geerinckx-Rice via Guix-patches
2019-07-26  8:17 ` [bug#36814] [PATCH 0/2] Add VA-API Intel back-end and utilities Tobias Geerinckx-Rice via Guix-patches
2019-07-26  8:56   ` Jelle Licht
2019-07-26 17:58     ` Tobias Geerinckx-Rice via Guix-patches
2019-07-26 18:40 ` Tobias Geerinckx-Rice via Guix-patches [this message]
2019-07-27 18:26   ` [bug#36814] [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide LIBVA_DRIVERS_PATH Marius Bakke
2019-07-27 18:50     ` Tobias Geerinckx-Rice via Guix-patches
2019-07-27 19:08       ` Tobias Geerinckx-Rice via Guix-patches
2019-07-27 19:16         ` Marius Bakke
2019-07-27 19:13       ` Marius Bakke
2019-07-27 21:29 ` bug#36814: [PATCH 0/2] Add VA-API Intel back-end and utilities Tobias Geerinckx-Rice via Guix-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190726184040.31236-1-me@tobias.gr \
    --to=guix-patches@gnu.org \
    --cc=36814@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).