Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkg-config, python3 2, intel-gpu-tools, libdrm, libva, libX11, libGL, wayland, libXext 3, enableHybridCodec ? false, vaapi-intel-hybrid 4}: 5 6stdenv.mkDerivation rec { 7 pname = "intel-vaapi-driver"; 8 version = "2.4.1"; 9 10 src = fetchFromGitHub { 11 owner = "intel"; 12 repo = "intel-vaapi-driver"; 13 rev = version; 14 sha256 = "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"; 15 }; 16 17 # Set the correct install path: 18 LIBVA_DRIVERS_PATH = "${placeholder "out"}/lib/dri"; 19 20 postInstall = lib.optionalString enableHybridCodec '' 21 ln -s ${vaapi-intel-hybrid}/lib/dri/* $out/lib/dri/ 22 ''; 23 24 configureFlags = [ 25 "--enable-x11" 26 "--enable-wayland" 27 ] ++ lib.optional enableHybridCodec "--enable-hybrid-codec"; 28 29 nativeBuildInputs = [ autoreconfHook gnum4 pkg-config python3 ]; 30 31 buildInputs = [ intel-gpu-tools libdrm libva libX11 libXext libGL wayland ] 32 ++ lib.optional enableHybridCodec vaapi-intel-hybrid; 33 34 enableParallelBuilding = true; 35 36 meta = with lib; { 37 homepage = "https://01.org/linuxmedia"; 38 license = licenses.mit; 39 description = "VA-API user mode driver for Intel GEN Graphics family"; 40 longDescription = '' 41 This VA-API video driver backend provides a bridge to the GEN GPUs through 42 the packaging of buffers and commands to be sent to the i915 driver for 43 exercising both hardware and shader functionality for video decode, 44 encode, and processing. 45 VA-API is an open-source library and API specification, which provides 46 access to graphics hardware acceleration capabilities for video 47 processing. It consists of a main library and driver-specific acceleration 48 backends for each supported hardware vendor. 49 ''; 50 platforms = [ "x86_64-linux" "i686-linux" ]; 51 maintainers = with maintainers; [ ]; 52 }; 53}