2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkg-config, python3
|
2023-07-15 17:15:38 +00:00
|
|
|
, intel-gpu-tools, libdrm, libva
|
2020-04-24 23:36:52 +00:00
|
|
|
, enableHybridCodec ? false, vaapi-intel-hybrid
|
2023-07-15 17:15:38 +00:00
|
|
|
, enableGui ? true, libX11, libGL, wayland, libXext
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "intel-vaapi-driver";
|
2020-07-18 16:06:22 +00:00
|
|
|
version = "2.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "intel-vaapi-driver";
|
|
|
|
rev = version;
|
2020-07-18 16:06:22 +00:00
|
|
|
sha256 = "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# Set the correct install path:
|
|
|
|
LIBVA_DRIVERS_PATH = "${placeholder "out"}/lib/dri";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postInstall = lib.optionalString enableHybridCodec ''
|
2020-04-24 23:36:52 +00:00
|
|
|
ln -s ${vaapi-intel-hybrid}/lib/dri/* $out/lib/dri/
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
2023-07-15 17:15:38 +00:00
|
|
|
(lib.enableFeature enableGui "x11")
|
|
|
|
(lib.enableFeature enableGui "wayland")
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optional enableHybridCodec "--enable-hybrid-codec";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook gnum4 pkg-config python3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ intel-gpu-tools libdrm libva ]
|
|
|
|
++ lib.optionals enableGui [ libX11 libXext libGL wayland ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional enableHybridCodec vaapi-intel-hybrid;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://01.org/linuxmedia";
|
|
|
|
license = licenses.mit;
|
2020-07-18 16:06:22 +00:00
|
|
|
description = "VA-API user mode driver for Intel GEN Graphics family";
|
|
|
|
longDescription = ''
|
|
|
|
This VA-API video driver backend provides a bridge to the GEN GPUs through
|
|
|
|
the packaging of buffers and commands to be sent to the i915 driver for
|
|
|
|
exercising both hardware and shader functionality for video decode,
|
|
|
|
encode, and processing.
|
|
|
|
VA-API is an open-source library and API specification, which provides
|
|
|
|
access to graphics hardware acceleration capabilities for video
|
|
|
|
processing. It consists of a main library and driver-specific acceleration
|
|
|
|
backends for each supported hardware vendor.
|
|
|
|
'';
|
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|