anchor.diff:  
     outputs = [ "out" "doc" ];
   
  -  nativeBuildInputs = [ pkg-config ];
  +  nativeBuildInputs = [
  +    pkg-config
  +  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
  +    # configure: error: tangle was not found but is required when cross-compiling.
  +    texlive.bin.core
  +  ];
  +
     buildInputs = [
       /*teckit*/ zziplib mpfr gmp
       pixman gd freetype libpng libpaper zlib
  
positive.code: { lib, stdenv, fetchurl, fetchpatch
  , texlive
  , zlib, libiconv, libpng, libX11
  , freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext
  
negative.code: 
    # TODO: perhaps improve texmf.cnf search locations
    postInstall = /* links format -> engine will be regenerated in texlive.combine */ ''
      PATH="$out/bin:$PATH" ${buildPackages.texlive.bin.texlinks}/bin/texlinks --cnffile "$out/share/texmf-dist/web2c/fmtutil.cnf" --unlink "$out/bin"
    '' + /* a few texmf-dist files are useful; take the rest from pkgs */ ''
      mv "$out/share/texmf-dist/web2c/texmf.cnf" .
      rm -r "$out/share/texmf-dist"
  