intel-media-driver: Fix runtime issues due to the libX11 dependency
X11 is an optional run-time and optional build-time dependency of iHD. A patchelf is required to join these two worlds together, and a lot of machines that'll run the intel-media-driver won't have X11 on them, so make it optional. Fix #73236. Co-Authored-By: Michael Weiss <dev.primeos@gmail.com>
This commit is contained in:
parent
464633d5f7
commit
0e061a8595
1 changed files with 9 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
{ stdenv, fetchFromGitHub
|
||||
, cmake, pkg-config
|
||||
, libva, libpciaccess, intel-gmmlib, libX11
|
||||
, libva, libpciaccess, intel-gmmlib
|
||||
, enableX11 ? true, libX11
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -23,7 +24,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ libva libpciaccess intel-gmmlib libX11 ];
|
||||
buildInputs = [ libva libpciaccess intel-gmmlib ]
|
||||
++ stdenv.lib.optional enableX11 libX11;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Intel Media Driver for VAAPI — Broadwell+ iGPUs";
|
||||
|
@ -38,4 +40,9 @@ stdenv.mkDerivation rec {
|
|||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ primeos jfrankenau ];
|
||||
};
|
||||
|
||||
postFixup = stdenv.lib.optionalString enableX11 ''
|
||||
patchelf --set-rpath "$(patchelf --print-rpath $out/lib/dri/iHD_drv_video.so):${stdenv.lib.makeLibraryPath [ libX11 ]}" \
|
||||
$out/lib/dri/iHD_drv_video.so
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue