2017-12-15 21:10:12 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig
|
|
|
|
, libXext, libdrm, libXfixes, wayland, libffi, libX11
|
2018-02-24 12:06:44 +00:00
|
|
|
, libGL
|
2015-10-28 13:15:44 +00:00
|
|
|
, minimal ? true, libva
|
2015-03-28 20:52:03 +00:00
|
|
|
}:
|
2011-04-16 12:00:31 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-12-15 21:10:12 +00:00
|
|
|
name = "libva-${lib.optionalString (!minimal) "full-"}${version}";
|
2018-02-21 03:35:40 +00:00
|
|
|
version = "2.1.0";
|
2017-12-15 21:10:12 +00:00
|
|
|
|
2018-02-21 03:35:40 +00:00
|
|
|
# update libva-utils and vaapiIntel as well
|
2017-12-15 21:10:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "01org";
|
|
|
|
repo = "libva";
|
|
|
|
rev = version;
|
2018-02-21 03:35:40 +00:00
|
|
|
sha256 = "1a60lrgr65hx9b2qp0gjky1298c4d4zp3ap6vnmmz850sxx5rm8w";
|
2011-04-16 12:00:31 +01:00
|
|
|
};
|
|
|
|
|
2017-12-15 21:10:12 +00:00
|
|
|
outputs = [ "dev" "out" ];
|
2011-04-16 12:00:31 +01:00
|
|
|
|
2017-12-15 21:10:12 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
2015-10-28 13:15:44 +00:00
|
|
|
|
|
|
|
buildInputs = [ libdrm ]
|
2018-02-24 12:06:44 +00:00
|
|
|
++ lib.optionals (!minimal) [ libva 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
|
|
|
|
|
2017-12-15 21:10:12 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
2018-02-24 12:06:44 +00:00
|
|
|
"--with-drivers-path=${libGL.driverLink}/lib/dri"
|
2017-12-15 21:10:12 +00:00
|
|
|
] ++ lib.optionals (!minimal) [ "--enable-glx" ];
|
2016-01-24 23:56:27 +00:00
|
|
|
|
2017-12-15 21:10:12 +00:00
|
|
|
installFlags = [
|
|
|
|
"dummy_drv_video_ladir=$(out)/lib/dri"
|
|
|
|
];
|
2011-04-16 12:00:31 +01:00
|
|
|
|
2014-08-04 07:19:52 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-12-15 21:10:12 +00:00
|
|
|
description = "VAAPI library: Video Acceleration API";
|
2011-04-16 12:00:31 +01:00
|
|
|
homepage = http://www.freedesktop.org/wiki/Software/vaapi;
|
2014-08-04 07:19:52 +01:00
|
|
|
license = licenses.mit;
|
2017-12-15 20:52:49 +00:00
|
|
|
maintainers = with maintainers; [ garbas ];
|
2017-12-15 21:10:12 +00:00
|
|
|
platforms = platforms.unix;
|
2011-04-16 12:00:31 +01:00
|
|
|
};
|
|
|
|
}
|