anchor.diff:          cd api/
         '';
   
  +      postBuild = ''
  +        # Make sure Mesa extensions are included in the header.
  +        grep -qP '^}$' EGL/eglext.h
  +        local -a eglext_mesaheaders
  +        mapfile -t eglext_mesaheaders < <(
  +          find '${mesa-headers}/include/EGL/' -type f -regex '.*ext.*\.h'
  +        )
  +        local eglext_mesaheader
  +        for eglext_mesaheader in "''${eglext_mesaheaders[@]}"; do
  +          sed -zE "s,(\n[^\n]*){6}$,\n#include <EGL/$(basename "$eglext_mesaheader")>&," -i EGL/eglext.h
  +        done
  +      '';
  +
         installPhase = ''
           for header in {EGL/egl{,ext,platform},KHR/khrplatform}.h; do
             install -D -m644 -v "$header" ${name}/include/"$header"
  
positive.code:   name = "egl-headers-${date}";
  
    src = fetchurl {
      url = "http://egl-registry.tar.xz";
      multihash = "Qma9rtynxUNEy8AxSsuEE7kCNqYvMU8bTeJQL8CiYo27TU";
      sha256 = "de926279c49b99d2d702217a073cf25b60d58cb81a30a91150cc0892b2b32532";
    };
  
    configurePhase = ":";
  
negative.code: , fetchFromGitHub
  , fetchurl
  , lib
  , mesa-headers
  , python3Packages
  }:
  
  