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: , fetchFromGitHub
  , fetchurl
  , lib
  , python3Packages
  }:
  
  
negative.code:   name = "egl-headers-${date}";
  
    src = fetchurl {
      name = "egl-registry-${date}.tar.xz";
      multihash = "QmcuqWrcyfZnyoEebWeBLyWtkptN29K8UQKdkxxEbZkDEG ";
      sha256 = "829d3a5fb6de4016310cbeeb5b1594b132a4477f41ca4bd74b5b6ea68b9acb8f";
    };
  
    configurePhase = ":";
  