2021-07-21 07:28:18 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, meson, pkg-config, ninja, wayland-scanner
|
2020-06-18 07:06:33 +00:00
|
|
|
, libdrm
|
2023-07-15 17:15:38 +00:00
|
|
|
, minimal ? false
|
2021-07-21 07:28:18 +00:00
|
|
|
, libX11, libXext, libXfixes, wayland, libffi, libGL
|
2020-06-18 07:06:33 +00:00
|
|
|
, mesa
|
2022-12-02 08:20:57 +00:00
|
|
|
# for passthru.tests
|
|
|
|
, intel-compute-runtime
|
2022-11-21 17:40:18 +00:00
|
|
|
, intel-media-driver
|
2022-12-02 08:20:57 +00:00
|
|
|
, mpv
|
2023-07-15 17:15:38 +00:00
|
|
|
, intel-vaapi-driver
|
2022-12-02 08:20:57 +00:00
|
|
|
, vlc
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-04-15 01:41:22 +00:00
|
|
|
pname = "libva" + lib.optionalString minimal "-minimal";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.20.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-05-03 17:38:23 +00:00
|
|
|
owner = "intel";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "libva";
|
|
|
|
rev = version;
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-ENAsytjqvS8xHZyZLPih3bzBgQ1f/j+s3dWZs1GTWHs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "dev" "out" ];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ meson pkg-config ninja ]
|
|
|
|
++ lib.optional (!minimal) wayland-scanner;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ libdrm ]
|
2023-07-15 17:15:38 +00:00
|
|
|
++ lib.optionals (!minimal) [ libX11 libXext libXfixes wayland libffi libGL ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
mesonFlags = [
|
2021-09-26 12:46:18 +00:00
|
|
|
# Add FHS and Debian paths for non-NixOS applications
|
|
|
|
"-Ddriverdir=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/i386-linux-gnu/dri"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
passthru.tests = {
|
2022-12-02 08:20:57 +00:00
|
|
|
# other drivers depending on libva and selected application users.
|
|
|
|
# Please get a confirmation from the maintainer before adding more applications.
|
2023-07-15 17:15:38 +00:00
|
|
|
inherit intel-compute-runtime intel-media-driver intel-vaapi-driver mpv vlc;
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-03 17:38:23 +00:00
|
|
|
description = "An implementation for VA-API (Video Acceleration API)";
|
|
|
|
longDescription = ''
|
|
|
|
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 (this package) and
|
|
|
|
driver-specific acceleration backends for each supported hardware vendor.
|
|
|
|
'';
|
|
|
|
homepage = "https://01.org/linuxmedia/vaapi";
|
|
|
|
changelog = "https://raw.githubusercontent.com/intel/libva/${version}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|