mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 12:53:05 +00:00
51 lines
1.6 KiB
Nix
51 lines
1.6 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, cmake, pkg-config
|
|
, libva, libpciaccess, intel-gmmlib
|
|
, enableX11 ? stdenv.isLinux, libX11
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "intel-media-driver";
|
|
version = "21.3.4";
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "intel";
|
|
repo = "media-driver";
|
|
rev = "intel-media-${version}";
|
|
sha256 = "1ch1bvqg6p0i7ahblhy0h9c43y2mfhqb25v1s344iqsrywwcpzzr";
|
|
};
|
|
|
|
cmakeFlags = [
|
|
"-DINSTALL_DRIVER_SYSCONF=OFF"
|
|
"-DLIBVA_DRIVERS_PATH=${placeholder "out"}/lib/dri"
|
|
# Works only on hosts with suitable CPUs.
|
|
"-DMEDIA_RUN_TEST_SUITE=OFF"
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ libva libpciaccess intel-gmmlib ]
|
|
++ lib.optional enableX11 libX11;
|
|
|
|
postFixup = lib.optionalString enableX11 ''
|
|
patchelf --set-rpath "$(patchelf --print-rpath $out/lib/dri/iHD_drv_video.so):${lib.makeLibraryPath [ libX11 ]}" \
|
|
$out/lib/dri/iHD_drv_video.so
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Intel Media Driver for VAAPI — Broadwell+ iGPUs";
|
|
longDescription = ''
|
|
The Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API)
|
|
user mode driver supporting hardware accelerated decoding, encoding, and
|
|
video post processing for GEN based graphics hardware.
|
|
'';
|
|
homepage = "https://github.com/intel/media-driver";
|
|
changelog = "https://github.com/intel/media-driver/releases/tag/intel-media-${version}";
|
|
license = with licenses; [ bsd3 mit ];
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ primeos jfrankenau ];
|
|
};
|
|
}
|