{ stdenv, fetchurl, libX11, pkgconfig, libXext, mesa, libdrm, libXfixes }:

stdenv.mkDerivation rec {
  name = "libva-1.2.1";
  
  src = fetchurl {
    url = "http://www.freedesktop.org/software/vaapi/releases/libva/${name}.tar.bz2";
    sha1 = "f716a4cadd670b14f44a2e833f96a2c509956339";
  };

  buildInputs = [ libX11 libXext pkgconfig mesa libdrm libXfixes ];

  configureFlags = [ "--enable-glx" ];

  meta = {
    homepage = http://www.freedesktop.org/wiki/Software/vaapi;
    license = "MIT";
    description = "VAAPI library: Video Acceleration API";
  };
}

{ stdenv, fetchurl, libX11, pkgconfig, libXext, mesa, libdrm, libXfixes }:

stdenv.mkDerivation rec {
  name = "libva-1.1.1";
  
  src = fetchurl {
    url = "http://www.freedesktop.org/software/vaapi/releases/libva/${name}.tar.bz2";
    sha256 = "0kfdcrzcr82g15l0vvmm6rqr0f0604d4dgrza78gn6bfx7rppby0";
  };

  buildInputs = [ libX11 libXext pkgconfig mesa libdrm libXfixes ];

  configureFlags = [ "--enable-glx" ];

  meta = {
    homepage = http://www.freedesktop.org/wiki/Software/vaapi;
    license = "MIT";
    description = "VAAPI library: Video Acceleration API";
  };
}

Revert "libva: update (fix h264encode)"
Revert "libva: update (fix h264encode)"

It breaks the latest vlc, and I don't need the new libva that much.
http://hydra.nixos.org/build/5540612/nixlog/1/tail-reload

This reverts commit 6a13cd01ac76465f7ce6397075ea8edeab434a74.
