libva: use OpenGL drivers link directory

This commit is contained in:
Nikolay Amiantov 2016-01-25 02:56:27 +03:00
parent 6563fa6125
commit 1b95212a69

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, libX11, pkgconfig, libXext, libdrm, libXfixes, wayland, libffi { stdenv, fetchurl, libX11, pkgconfig, libXext, libdrm, libXfixes, wayland, libffi
, mesa ? null , mesa_noglu ? null
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -10,9 +10,20 @@ stdenv.mkDerivation rec {
sha256 = "0bjfb5s8dk3lql843l91ffxzlq47isqks5sj19cxh7j3nhzw58kz"; sha256 = "0bjfb5s8dk3lql843l91ffxzlq47isqks5sj19cxh7j3nhzw58kz";
}; };
buildInputs = [ libX11 libXext pkgconfig libdrm libXfixes wayland libffi mesa ]; buildInputs = [ libX11 libXext pkgconfig libdrm libXfixes wayland libffi mesa_noglu ];
configureFlags = stdenv.lib.optional (mesa != null) "--enable-glx"; configureFlags = stdenv.lib.optionals (mesa_noglu != null) [
"--with-drivers-path=${mesa_noglu.driverLink}/lib/dri"
"--enable-glx"
];
installFlags = [ "DESTDIR=$(out)" ];
postInstall = ''
cp -r $out/${mesa_noglu.driverLink}/* $out
cp -r $out/$out/* $out
rm -rf $out/run $out/$(echo "$out" | cut -d "/" -f2)
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.freedesktop.org/wiki/Software/vaapi; homepage = http://www.freedesktop.org/wiki/Software/vaapi;