2021-07-03 15:02:23 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, meson, pkg-config, ninja, wayland-scanner
|
2020-05-23 16:55:54 +00:00
|
|
|
, libdrm
|
2018-02-09 04:05:38 +00:00
|
|
|
, minimal ? false, libva-minimal
|
2021-07-03 15:02:23 +00:00
|
|
|
, libX11, libXext, libXfixes, wayland, libffi, libGL
|
2020-05-23 16:55:54 +00:00
|
|
|
, mesa
|
2015-03-28 20:52:03 +00:00
|
|
|
}:
|
2011-04-16 11:00:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-31 15:51:54 +00:00
|
|
|
pname = "libva" + lib.optionalString minimal "minimal";
|
2021-09-18 11:14:44 +00:00
|
|
|
version = "2.13.0";
|
2017-12-15 21:10:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-04-23 18:51:52 +00:00
|
|
|
owner = "intel";
|
2017-12-15 21:10:12 +00:00
|
|
|
repo = "libva";
|
|
|
|
rev = version;
|
2021-09-18 11:14:44 +00:00
|
|
|
sha256 = "0vsvli3xc0gqqp06p7wkm973lhr7c5qgnyz5jfjmf8kv75rajazp";
|
2011-04-16 11:00:31 +00:00
|
|
|
};
|
|
|
|
|
2017-12-15 21:10:12 +00:00
|
|
|
outputs = [ "dev" "out" ];
|
2011-04-16 11:00:31 +00:00
|
|
|
|
2021-07-03 15:02:23 +00:00
|
|
|
nativeBuildInputs = [ meson pkg-config ninja wayland-scanner ];
|
2015-10-28 13:15:44 +00:00
|
|
|
|
|
|
|
buildInputs = [ libdrm ]
|
2018-02-09 04:05:38 +00:00
|
|
|
++ lib.optionals (!minimal) [ libva-minimal libX11 libXext libXfixes wayland libffi libGL ];
|
2015-10-28 13:15:44 +00:00
|
|
|
# TODO: share libs between minimal and !minimal - perhaps just symlink them
|
|
|
|
|
2020-05-23 16:55:54 +00:00
|
|
|
mesonFlags = [
|
2021-08-31 16:07:14 +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"
|
2017-12-15 21:10:12 +00:00
|
|
|
];
|
2011-04-16 11:00:31 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-23 18:51:52 +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";
|
2014-08-04 06:19:52 +00:00
|
|
|
license = licenses.mit;
|
2020-04-23 18:51:52 +00:00
|
|
|
maintainers = with maintainers; [ primeos ];
|
2017-12-15 21:10:12 +00:00
|
|
|
platforms = platforms.unix;
|
2011-04-16 11:00:31 +00:00
|
|
|
};
|
|
|
|
}
|