11 , enableX11 ? stdenv.hostPlatform.isLinux
17 stdenv.mkDerivation rec {
18 pname = "intel-media-driver";
21 outputs = [ "out" "dev" ];
23 src = fetchFromGitHub {
25 repo = "media-driver";
26 rev = "intel-media-${version}";
27 hash = "sha256-vgbWwL4mu8YZzfvBvxna8Ioz6ig29iA2RZHKuHdh5Ic=";
31 # fix platform detection
33 url = "https://salsa.debian.org/multimedia-team/intel-media-driver-non-free/-/raw/7376a99f060c26d6be8e56674da52a61662617b9/debian/patches/0002-Remove-settings-based-on-ARCH.patch";
34 hash = "sha256-57yePuHWYb3XXrB4MjYO2h6jbqfs4SGTLlLG91el8M4=";
39 "-DINSTALL_DRIVER_SYSCONF=OFF"
40 "-DLIBVA_DRIVERS_PATH=${placeholder "out"}/lib/dri"
41 # Works only on hosts with suitable CPUs.
42 "-DMEDIA_RUN_TEST_SUITE=OFF"
43 "-DMEDIA_BUILD_FATAL_WARNINGS=OFF"
46 env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64";
48 nativeBuildInputs = [ cmake pkg-config ];
50 buildInputs = [ libva libpciaccess intel-gmmlib libdrm ]
51 ++ lib.optional enableX11 libX11;
53 postFixup = lib.optionalString enableX11 ''
54 patchelf --set-rpath "$(patchelf --print-rpath $out/lib/dri/iHD_drv_video.so):${lib.makeLibraryPath [ libX11 ]}" \
55 $out/lib/dri/iHD_drv_video.so
59 inherit (pkgsi686Linux) intel-media-driver;
63 description = "Intel Media Driver for VAAPI — Broadwell+ iGPUs";
65 The Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API)
66 user mode driver supporting hardware accelerated decoding, encoding, and
67 video post processing for GEN based graphics hardware.
69 homepage = "https://github.com/intel/media-driver";
70 changelog = "https://github.com/intel/media-driver/releases/tag/intel-media-${version}";
71 license = with licenses; [ bsd3 mit ];
72 platforms = platforms.linux;
73 maintainers = with maintainers; [ SuperSandro2000 ];