2020-06-18 07:06:33 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, meson, pkg-config, ninja, wayland
|
|
|
|
, libdrm
|
2020-04-24 23:36:52 +00:00
|
|
|
, minimal ? false, libva-minimal
|
2020-06-18 07:06:33 +00:00
|
|
|
, libX11, libXext, libXfixes, libffi, libGL
|
|
|
|
, mesa
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libva-${lib.optionalString minimal "minimal-"}${version}";
|
2021-04-12 18:23:04 +00:00
|
|
|
version = "2.11.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;
|
2021-04-12 18:23:04 +00:00
|
|
|
sha256 = "0qk30p53mnwiqh2x68vyif11vg3gyjvw8v4qihg099m41qb44hws";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "dev" "out" ];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
nativeBuildInputs = [ meson pkg-config ninja wayland ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ libdrm ]
|
|
|
|
++ lib.optionals (!minimal) [ libva-minimal libX11 libXext libXfixes wayland libffi libGL ];
|
|
|
|
# TODO: share libs between minimal and !minimal - perhaps just symlink them
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
mesonFlags = [
|
|
|
|
# Add FHS paths for non-NixOS applications:
|
|
|
|
"-Ddriverdir=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri"
|
2020-04-24 23:36:52 +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;
|
2020-05-03 17:38:23 +00:00
|
|
|
maintainers = with maintainers; [ primeos ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|