anchor.diff:    buildPhase = ":";
   
     installPhase = ''
  -    for api in GL{,ES{,2,3},SC{,2}}; do
  -      pushd $api/
  -        while read header; do
  -          install -D -m644 -v $header $out/include/$(basename "$api")/$header
  -        done < <(find . -name "*.h" -printf '%P\n')
  +    local opengl_api
  +    for opengl_api in GL{,ES{,2,3},SC{,2}}; do
  +      pushd $opengl_api/
  +        local -a opengl_headers
  +        mapfile -t opengl_headers < <(find . -name '*.h' -printf '%P\n')
  +        for opengl_header in "''${opengl_headers[@]}"; do
  +          install -D -m644 -v "$opengl_header" \
  +            "$out"/include/"$(basename "$opengl_api")"/"$opengl_header"
  +        done
         popd
       done
   
  -    for xml in xml/*.xml; do
  -      install -D -m644 -v "$xml" \
  -        "$out"/share/opengl-registry/"$(basename "$xml")"
  +    local opengl_xml
  +    for opengl_xml in xml/*.xml; do
  +      install -D -m644 -v "$opengl_xml" \
  +        "$out"/share/opengl-registry/"$(basename "$opengl_xml")"
       done
     '';
   
  
positive.code: 
        configurePhase = ":";
  
        buildPhase = ''
          # Some headers such as glx.h are not pre-generated, regenerate all
          # to be sure none are missing.
          pushd xml/
            python genheaders.py
          popd
          pushd api/
            for header in glcorearb.h glext.h gl.h; do
              python ../xml/genglvnd.py -registry ../xml/gl.xml GL/$header.h
            done
          popd
          for xml in xml/*.xml; do
            install -D -m644 -v "$xml" \
              api/xml/"$(basename "$xml")"
          done
  
          tar -Jcvf opengl-headers-${date}.tar.xz api/
        '';
  
        installPhase = ''
          install -D -m644 -v 'opengl-headers-${date}.tar.xz' \
            "$out/opengl-headers-${date}.tar.xz"
        '';
  
negative.code: 
    src = fetchurl {
      name = "opengl-headers-${date}.tar.xz";
      multihash = "QmRMy2iGHh535k8mjVKhZ4CMypWbK5hE21bZg1MB7eDyS3";
      sha256 = "7b6ba3e1c12dc8d4150c853ad8b6338e52f2f93a1cff609da55cd381bb47d3dd";
    };
  
    configurePhase = ":";
  