anchor.diff:      ++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler"
       ++ optional enableTextureFloats "--enable-texture-float"
       ++ optionals enableExtraFeatures [
  -      "--enable-osmesa"
         "--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful
         #"--enable-xvmc" # tests segfault with 9.1.{1,2,3}
         #"--enable-opencl" # ToDo: opencl seems to need libclc for clover
  
positive.code:   #doCheck = true; # https://bugs.freedesktop.org/show_bug.cgi?id=67672
    # TODO: best fix this before merging >=9.2 to master
  
    # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
    # ToDo: probably not all .la files are completely fixed, but it shouldn't matter
    postInstall = with stdenv.lib; ''
      mv -t "$drivers/lib/" \
    '' + optionalString enableExtraFeatures ''
        `#$out/lib/libXvMC*` \
        $out/lib/libOSMesa* \
        $out/lib/gbm $out/lib/libgbm* \
        $out/lib/gallium-pipe \
    '' + ''
  
negative.code:       -i src/egl/main/Makefile.am
    '';
  
    outputs = ["out" "drivers" "osmesa"];
  
    preConfigure = "./autogen.sh";
  
  