anchor.diff:        src = fetchFromGitHub {
           owner = "KhronosGroup";
           repo = "SPIRV-Tools";
  -        rev = "c9c1f54330d13a0bec1aa3f08d436249d8e35596";
  -        sha256 = "0r5whsw9x8j4199xwxv293ar2ga73pm2s7rngw732ylh6rw3bkly";
  +        rev = "c79edd260c2b503f0eca57310057b4a100999cc5";
  +        sha256 = "01qq5g2a8c5ljn1j6yqh3v90kbhavibh45dcnasixvpf5q7k2ary";
         };
       });
       argSpirv-headers = localSpirvHeaders;
  
positive.code:     owner = "KhronosGroup";
      repo = "Vulkan-ValidationLayers";
      rev = "sdk-${version}";
      sha256 = "1mpqmxh9zm20jdar59lp4yjpqfzxn2pwds6bkvnzihfy0pymf15k";
    };
  
    nativeBuildInputs = [
      pkg-config
      cmake
      python3
    ];
  
    buildInputs = [
      localGlslang
      localGlslang.spirv-headers
      vulkan-headers
      vulkan-loader
      libxcb
      libXrandr
      wayland
    ];
  
    cmakeFlags = [
      "-DGLSLANG_INSTALL_DIR=${localGlslang}"
      "-DSPIRV_HEADERS_INSTALL_DIR=${localSpirvHeaders}"
      "-DBUILD_LAYER_SUPPORT_FILES=ON"
    ];
  
    # Include absolute paths to layer libraries in their associated
    # layer definition json files.
    patchPhase = ''
      sed "s|\([[:space:]]*set(INSTALL_DEFINES \''${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY=\"\)\(\$<TARGET_FILE_NAME:\''${TARGET_NAME}>\")\)|\1$out/lib/\2|" -i layers/CMakeLists.txt
    '';
  
    meta = with lib; {
      description = "The official Khronos Vulkan validation layers";
  
negative.code: { lib
  , stdenv
  , fetchFromGitHub
  , cmake
  , glslang
  , libX11
  , libxcb
  , libXrandr
  , spirv-headers
  , spirv-tools
  , vulkan-headers
  , wayland
  }:
  
  let
    # vulkan-validation-layers requires a custom glslang & robin-hood-hashing
    # version, while glslang requires custom versions for spirv-tools and spirv-headers.
    #
    # The git hashes required for all of these deps is documented upstream here:
    # https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/scripts/known_good.json
    localSpirvHeaders = spirv-headers.overrideAttrs (_: {
      src = fetchFromGitHub {
        owner = "KhronosGroup";
        repo = "SPIRV-Headers";
        rev = "75b30a659c8a4979104986652c54cc421fc51129";
        sha256 = "1yzdp3m50zxabkg93j1lmazs45wjp20szvxiv8ifgcdjxmyzi5ji";
      };
    });
    localGlslang = (glslang.override {
  