2020-07-12 13:29:18 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkg-config, python3
|
2018-02-24 12:06:44 +00:00
|
|
|
, intel-gpu-tools, libdrm, libva, libX11, libGL, wayland, libXext
|
2018-06-27 21:15:52 +01:00
|
|
|
, enableHybridCodec ? false, vaapi-intel-hybrid
|
2015-05-05 13:41:54 +01:00
|
|
|
}:
|
2013-01-28 23:31:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "intel-vaapi-driver";
|
2020-07-12 12:08:51 +01:00
|
|
|
version = "2.4.1";
|
2013-06-03 05:01:12 +01:00
|
|
|
|
2017-12-15 21:10:12 +00:00
|
|
|
src = fetchFromGitHub {
|
2018-06-27 21:15:52 +01:00
|
|
|
owner = "intel";
|
|
|
|
repo = "intel-vaapi-driver";
|
2019-12-09 06:39:30 +00:00
|
|
|
rev = version;
|
2020-07-12 12:08:51 +01:00
|
|
|
sha256 = "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp";
|
2013-01-28 23:31:35 +00:00
|
|
|
};
|
|
|
|
|
2020-07-12 13:29:18 +01:00
|
|
|
# Set the correct install path:
|
|
|
|
LIBVA_DRIVERS_PATH = "${placeholder "out"}/lib/dri";
|
2013-01-28 23:31:35 +00:00
|
|
|
|
2018-06-27 21:15:52 +01:00
|
|
|
postInstall = stdenv.lib.optionalString enableHybridCodec ''
|
|
|
|
ln -s ${vaapi-intel-hybrid}/lib/dri/* $out/lib/dri/
|
|
|
|
'';
|
|
|
|
|
2015-05-05 13:41:54 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-x11"
|
|
|
|
"--enable-wayland"
|
2018-06-27 21:15:52 +01:00
|
|
|
] ++ stdenv.lib.optional enableHybridCodec "--enable-hybrid-codec";
|
2015-05-05 13:41:54 +01:00
|
|
|
|
2020-07-12 13:29:18 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook gnum4 pkg-config python3 ];
|
2015-05-05 13:41:54 +01:00
|
|
|
|
2018-06-27 21:15:52 +01:00
|
|
|
buildInputs = [ intel-gpu-tools libdrm libva libX11 libXext libGL wayland ]
|
|
|
|
++ stdenv.lib.optional enableHybridCodec vaapi-intel-hybrid;
|
2015-05-05 13:41:54 +01:00
|
|
|
|
2017-12-15 21:10:12 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-08-04 07:22:16 +01:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://01.org/linuxmedia";
|
2014-08-04 07:22:16 +01:00
|
|
|
license = licenses.mit;
|
2020-07-12 13:29:18 +01: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" ];
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
2013-01-28 23:31:35 +00:00
|
|
|
};
|
|
|
|
}
|