1 { lib, stdenv, fetchurl, fetchFromGitHub, autoreconfHook, pkg-config, cmrt, libdrm, libva, libX11, libGL, wayland }:
3 stdenv.mkDerivation rec {
4 pname = "intel-hybrid-driver";
7 src = fetchFromGitHub {
9 repo = "intel-hybrid-driver";
11 sha256 = "sha256-uYX7RoU1XVzcC2ea3z/VBjmT47xmzK67Y4LaiFXyJZ8=";
15 # driver_init: load libva-x11.so for any ABI version
17 url = "https://github.com/01org/intel-hybrid-driver/pull/26.diff";
18 sha256 = "1ql4mbi5x1d2a5c8mkjvciaq60zj8nhx912992winbhfkyvpb3gx";
22 nativeBuildInputs = [ autoreconfHook pkg-config ];
24 buildInputs = [ cmrt libdrm libva libX11 libGL wayland ];
26 enableParallelBuilding = true;
28 # Workaround build failure on -fno-common toolchains like upstream gcc-10.
29 env.NIX_CFLAGS_COMPILE = "-fcommon";
38 patchShebangs ./src/shaders/gpp.py
42 sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure
46 homepage = "https://01.org/linuxmedia";
47 description = "Intel driver for the VAAPI library with partial HW acceleration";
48 license = licenses.mit;
49 maintainers = with maintainers; [ tadfisher ];
50 platforms = platforms.linux;