From 1b95228a53a06378e1c5df759195e5ae4389d7ef Mon Sep 17 00:00:00 2001 From: codyopel Date: Tue, 5 May 2015 08:41:54 -0400 Subject: [PATCH] libva-intel-driver: refactor --- .../libraries/vaapi-intel/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/vaapi-intel/default.nix b/pkgs/development/libraries/vaapi-intel/default.nix index 8eddb2b0ae8a..d873d801bac7 100644 --- a/pkgs/development/libraries/vaapi-intel/default.nix +++ b/pkgs/development/libraries/vaapi-intel/default.nix @@ -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 { name = "libva-intel-driver-1.5.1"; @@ -8,16 +10,24 @@ stdenv.mkDerivation rec { sha256 = "1p7aw0wmb6z3rbbm3bqlp6rxw41kii23csbjmcvbbk037lq6rnqb"; }; - prePatch = '' - sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,' src/shaders/gpp.py + patchPhase = '' + patchShebangs ./src/shaders/gpp.py ''; - buildInputs = [ pkgconfig libdrm libva libX11 intel-gpu-tools mesa_noglu wayland gnum4 ]; - preConfigure = '' 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; { homepage = http://cgit.freedesktop.org/vaapi/intel-driver/; license = licenses.mit;