anchor.diff:      "--localstatedir=/var"
       "--enable-largefile"
       # slight performance degradation, enable only for grsec
  -    (enFlag "glx-rts" grsecEnabled null)
  +    "--${boolEn grsecEnabled}-glx-rts"
       "--disable-debug"
       "--disable-profile"
  -    (enFlag "libglvnd" (libglvnd != null) null)
  +    "--${boolEn (libglvnd != null)}-libglvnd"
       "--disable-mangling"
  -    (enFlag "texture-float" enableTextureFloats null)
  +    "--${boolEn enableTextureFloats}-texture-float"
       "--enable-asm"
       # TODO: selinux support
       "--disable-selinux"
  
positive.code: 
  let
    inherit (stdenv.lib)
      enFlag
      head
      optional
      optionals
      optionalString
      splitString;
  in
  
  let
    # this is the default search path for DRI drivers
    driverSearchPath = "/run/opengl-driver-${stdenv.targetSystem}";
  in
  
  stdenv.mkDerivation rec {
    name = "mesa-noglu-${version}";
    version = "12.0.1";
  
negative.code:     "--enable-xvmc"
      "--enable-vdpau"
      "--enable-omx"
      # FIXME: We use mesa as libgl at build time and libva depends on libgl
      #"--enable-va"
      # TODO: Figure out how to enable opencl without having a
      #       runtime dependency on clang
  