From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:58608) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr59M-0001RU-Vi for guix-patches@gnu.org; Fri, 26 Jul 2019 14:41:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr59L-00066m-Jr for guix-patches@gnu.org; Fri, 26 Jul 2019 14:41:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr59K-00065E-FG for guix-patches@gnu.org; Fri, 26 Jul 2019 14:41:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hr59K-0002Pg-Bh for guix-patches@gnu.org; Fri, 26 Jul 2019 14:41:02 -0400 Subject: [bug#36814] [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide LIBVA_DRIVERS_PATH. References: <871rydiifr.fsf@nckx> In-Reply-To: <871rydiifr.fsf@nckx> Resent-Message-ID: Date: Fri, 26 Jul 2019 20:40:40 +0200 Message-Id: <20190726184040.31236-1-me@tobias.gr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tobias Geerinckx-Rice via Guix-patches Reply-To: Tobias Geerinckx-Rice Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36814@debbugs.gnu.org * 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