anchor.diff:        buildPhase = ''
           # Some headers such as glx.h are not pre-generated, regenerate all
           # to be sure none are missing.
  -        pushd xml
  +        pushd xml/
             python genheaders.py
           popd
  -        pushd api
  +        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-${version}.tar.xz api/
         '';
  
positive.code: 
    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')
        popd
      done
    '';
  
  
negative.code: # TODO: build release tarballs, repo vendors pdfs
  
  let
    version = "2019-03-01";
  in
  stdenv.mkDerivation rec {
    name = "opengl-headers-${version}";
  
    src = fetchurl {
      url = "http://opengl-headers.tar.xz";  # dummy url
      multihash = "QmZdRTzsSxGWTSzmChywUgo6drKFoho8qDh4FagumAM3eS";
      sha256 = "7cfa0ed4091b4d04c33b1be3c30361f9613b7301744f0b4b6397b923d82295d0";
    };
  
    configurePhase = ":";
  