summary refs log tree commit diff
path: root/pkgs/development/libraries/libvdpau/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libvdpau/default.nix')
-rw-r--r--pkgs/development/libraries/libvdpau/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix
index 04d06a149fc..c2ec587a52e 100644
--- a/pkgs/development/libraries/libvdpau/default.nix
+++ b/pkgs/development/libraries/libvdpau/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, xorg }:
+{ stdenv, fetchurl, pkgconfig, xorg, mesa_noglu }:
 
 stdenv.mkDerivation rec {
   name = "libvdpau-1.1.1";
@@ -14,6 +14,16 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ xorg.libX11 ];
 
+  configureFlags = [ "--with-module-dir=${mesa_noglu.driverLink}/lib/vdpau" ];
+
+  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; {
     homepage = http://people.freedesktop.org/~aplattner/vdpau/;
     description = "Library to use the Video Decode and Presentation API for Unix (VDPAU)";