libva-intel-driver: refactor

This commit is contained in:
codyopel 2015-05-05 08:41:54 -04:00
parent e0181e4b72
commit 1b95228a53

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, pkgconfig, libdrm, libva, libX11, intel-gpu-tools, mesa_noglu, wayland, python, gnum4 }: { stdenv, fetchurl, gnum4, pkgconfig, python
, intel-gpu-tools, libdrm, libva, libX11, mesa_noglu, wayland
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libva-intel-driver-1.5.1"; name = "libva-intel-driver-1.5.1";
@ -8,16 +10,24 @@ stdenv.mkDerivation rec {
sha256 = "1p7aw0wmb6z3rbbm3bqlp6rxw41kii23csbjmcvbbk037lq6rnqb"; sha256 = "1p7aw0wmb6z3rbbm3bqlp6rxw41kii23csbjmcvbbk037lq6rnqb";
}; };
prePatch = '' patchPhase = ''
sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,' src/shaders/gpp.py patchShebangs ./src/shaders/gpp.py
''; '';
buildInputs = [ pkgconfig libdrm libva libX11 intel-gpu-tools mesa_noglu wayland gnum4 ];
preConfigure = '' preConfigure = ''
sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure
''; '';
configureFlags = [
"--enable-drm"
"--enable-x11"
"--enable-wayland"
];
nativeBuildInputs = [ gnum4 pkgconfig python ];
buildInputs = [ intel-gpu-tools libdrm libva libX11 mesa_noglu wayland ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://cgit.freedesktop.org/vaapi/intel-driver/; homepage = http://cgit.freedesktop.org/vaapi/intel-driver/;
license = licenses.mit; license = licenses.mit;