Merge pull request #73277 from robashton/master

Initial stab at making X11 a configurable dependency of intel-media-drivers
This commit is contained in:
Michael Weiss 2021-01-08 17:06:13 +01:00 committed by GitHub
commit 95dc08e972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
'';
}