nixpkgs/pkgs/development/libraries/intel-media-driver/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
2.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, libva
, libpciaccess
, intel-gmmlib
2021-12-30 13:32:42 +00:00
, libdrm
, enableX11 ? stdenv.isLinux
, libX11
2022-08-21 22:20:49 +00:00
# for passhtru.tests
, pkgsi686Linux
2018-11-07 16:53:57 +00:00
}:
stdenv.mkDerivation rec {
pname = "intel-media-driver";
version = "23.3.5";
2018-11-07 16:53:57 +00:00
outputs = [ "out" "dev" ];
2018-11-07 16:53:57 +00:00
src = fetchFromGitHub {
owner = "intel";
repo = "media-driver";
rev = "intel-media-${version}";
hash = "sha256-7OdLpqO2evNeyxceOtHEI7sJCVybqvrcM1ZZx8bI4xw=";
2018-11-07 16:53:57 +00:00
};
patches = [
# fix platform detection
(fetchpatch {
url = "https://salsa.debian.org/multimedia-team/intel-media-driver-non-free/-/raw/7376a99f060c26d6be8e56674da52a61662617b9/debian/patches/0002-Remove-settings-based-on-ARCH.patch";
hash = "sha256-57yePuHWYb3XXrB4MjYO2h6jbqfs4SGTLlLG91el8M4=";
})
];
2019-02-01 01:00:21 +00:00
cmakeFlags = [
"-DINSTALL_DRIVER_SYSCONF=OFF"
"-DLIBVA_DRIVERS_PATH=${placeholder "out"}/lib/dri"
# Works only on hosts with suitable CPUs.
"-DMEDIA_RUN_TEST_SUITE=OFF"
2022-12-04 21:14:08 +00:00
"-DMEDIA_BUILD_FATAL_WARNINGS=OFF"
2019-02-01 01:00:21 +00:00
];
2018-11-07 16:53:57 +00:00
env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64";
2020-06-10 21:18:04 +00:00
nativeBuildInputs = [ cmake pkg-config ];
2018-11-07 16:53:57 +00:00
2021-12-30 13:32:42 +00:00
buildInputs = [ libva libpciaccess intel-gmmlib libdrm ]
++ lib.optional enableX11 libX11;
2018-11-07 16:53:57 +00:00
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
'';
2022-08-21 22:20:49 +00:00
passthru.tests = {
inherit (pkgsi686Linux) intel-media-driver;
};
meta = with lib; {
2020-06-10 21:18:04 +00:00
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.
'';
2020-03-08 11:51:49 +00:00
homepage = "https://github.com/intel/media-driver";
2020-06-10 21:18:04 +00:00
changelog = "https://github.com/intel/media-driver/releases/tag/intel-media-${version}";
2018-11-07 16:53:57 +00:00
license = with licenses; [ bsd3 mit ];
platforms = platforms.linux;
maintainers = with maintainers; [ SuperSandro2000 ];
2018-11-07 16:53:57 +00:00
};
}