anchor.diff:      "--enable-osmesa" # used by wine
   
       "--with-dri-drivers=i965,r200,radeon"
  -    ("--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast"
  -      + optionalString enableR600LlvmCompiler ",radeonsi")
  +    ("--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast,radeonsi")
       "--with-egl-platforms=x11,wayland,drm" "--enable-gbm" "--enable-shared-glapi"
     ]
  -    ++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler"
       ++ optional enableTextureFloats "--enable-texture-float"
       ++ optionals enableExtraFeatures [
         "--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful
  
positive.code: */
  
  let
    version = "9.2.5";
    # this is the default search path for DRI drivers (note: X server introduces an overriding env var)
    driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32";
  in
  with { inherit (stdenv.lib) optional optionals optionalString; };
  
negative.code:   '';
  
    outputs = ["out" "drivers" "osmesa"];
  
    configureFlags = [
      "--with-dri-driverdir=$(drivers)/lib/dri"
  