1 { lib, stdenv, fetchFromGitHub
3 , libva, libpciaccess, intel-gmmlib
4 , enableX11 ? true, libX11
7 stdenv.mkDerivation rec {
8 pname = "intel-media-driver";
11 src = fetchFromGitHub {
13 repo = "media-driver";
14 rev = "intel-media-${version}";
15 sha256 = "1y6y6dia2y3b798f668q26pzwb1xai5d5jpmllpcxs9qikhkkx8p";
19 "-DINSTALL_DRIVER_SYSCONF=OFF"
20 "-DLIBVA_DRIVERS_PATH=${placeholder "out"}/lib/dri"
21 # Works only on hosts with suitable CPUs.
22 "-DMEDIA_RUN_TEST_SUITE=OFF"
25 nativeBuildInputs = [ cmake pkg-config ];
27 buildInputs = [ libva libpciaccess intel-gmmlib ]
28 ++ lib.optional enableX11 libX11;
31 description = "Intel Media Driver for VAAPI — Broadwell+ iGPUs";
33 The Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API)
34 user mode driver supporting hardware accelerated decoding, encoding, and
35 video post processing for GEN based graphics hardware.
37 homepage = "https://github.com/intel/media-driver";
38 changelog = "https://github.com/intel/media-driver/releases/tag/intel-media-${version}";
39 license = with licenses; [ bsd3 mit ];
40 platforms = platforms.linux;
41 maintainers = with maintainers; [ primeos jfrankenau ];
44 postFixup = lib.optionalString enableX11 ''
45 patchelf --set-rpath "$(patchelf --print-rpath $out/lib/dri/iHD_drv_video.so):${lib.makeLibraryPath [ libX11 ]}" \
46 $out/lib/dri/iHD_drv_video.so