anchor.diff:  
       # set the default search path for DRI drivers; used e.g. by X server
       substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}"
  -  '' + optionalString (!(stdenv.isArm || stdenv.isAarch64)) ''
  +  '' + optionalString (builtins.elem "intel" vulkanDrivers) ''
       # move share/vulkan/icd.d/
       mv $out/share/ $drivers/
       # Update search path used by Vulkan (it's pointing to $out but
  
positive.code: , grsecEnabled ? false
  , enableRadv ? false
  , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
  }:
  
  
  /** Packaging design:
    - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now).
  
negative.code: else
  
  let
    defaultGalliumDrivers =
      if (stdenv.isArm || stdenv.isAarch64)
      then ["nouveau" "freedreno" "vc4" "etnaviv"]
      else ["i915" "ilo" "r300" "r600" "radeonsi" "nouveau"];
    defaultDriDrivers =
      if (stdenv.isArm || stdenv.isAarch64)
      then ["nouveau"]
      else ["i915" "i965" "nouveau" "radeon" "r200"];
    defaultVulkanDrivers =
      if (stdenv.isArm || stdenv.isAarch64)
      then []
      else ["intel"] ++ lib.optional enableRadv "radeon";
  in
  
  let gallium_ = galliumDrivers; dri_ = driDrivers; vulkan_ = vulkanDrivers; in
  
  let
    galliumDrivers =
      ["svga"]
      ++ (if gallium_ == null
            then defaultGalliumDrivers
            else gallium_)
      ++ ["swrast"];
    driDrivers =
      (if dri_ == null
        then defaultDriDrivers
        else dri_) ++ ["swrast"];
    vulkanDrivers =
      if vulkan_ == null
      then defaultVulkanDrivers
      else vulkan_;
  in
  
  let
    version = "17.0.0";
    branch  = head (splitString "." version);
    driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
  