anchor.diff:          hg checkout ${lib.escapeShellArg src.rev}
         )
       '';
  +    postPatch = ''
  +      substituteInPlace substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/headers/PosixDirectives.java \
  +        --replace '<zlib.h>' '<${zlib.dev}/include/zlib.h>'
  +      substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/CCLinkerInvocation.java \
  +        --replace 'cmd.add("-v");' 'cmd.add("-v"); cmd.add("-L${zlib}/lib");'
  +    '';
       buildPhase = ''
         # make a copy of jvmci8
         cp -dpR ${jvmci8} $out
  
positive.code:     rec { sha1 = "280c265b789e041c02e5c97815793dfc283fb1e6"; name = "LIBFFI_${sha1}/libffi.tar.gz";                                                    url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/libffi-3.2.1.tar.gz; }
      rec { sha1 = "8819cea8bfe22c9c63f55465e296b3855ea41786"; name = "TruffleJSON_${sha1}/trufflejson.jar";                                             url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/trufflejson-20180130.jar; }
      rec { sha1 = "9712a8124c40298015f04a74f61b3d81a51513af"; name = "CHECKSTYLE_8.8_${sha1}/checkstyle-8.8.jar";                                       url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/checkstyle-8.8-all.jar; }
    ];
  
    findbugs = fetchzip {
  
negative.code:       mkdir -p $out/jre/tools/{profiler,chromeinspector,truffle/builder} $out/jre/lib/{graal,include,truffle/include}
        cp -vpLR substratevm/svmbuild/native-image-root/lib/*                         $out/jre/lib/           || true # ignore "same file" error when dereferencing symlinks
        cp -vp   $MX_ALT_OUTPUT_ROOT/truffle/linux-amd64/truffle-nfi-native/bin/*     $out/jre/lib/amd64/
        cp -vp   $MX_ALT_OUTPUT_ROOT/compiler/dists/jdk1.8/graal-*processor*.jar      $out/jre/lib/graal/
        cp -vp   $MX_ALT_OUTPUT_ROOT/truffle/linux-amd64/truffle-nfi-native/include/* $out/jre/lib/include/
        cp -vp   $MX_ALT_OUTPUT_ROOT/compiler/dists/jdk1.8/graal-management.jar       $out/jre/lib/jvmci/
        cp -vdpR $out/jre/lib/svm/clibraries                                          $out/jre/lib/svm/builder/
        cp -vpR  $MX_ALT_OUTPUT_ROOT/truffle/dists/jdk1.8/*                           $out/jre/lib/truffle/
        cp -vp   $MX_ALT_OUTPUT_ROOT/truffle/linux-amd64/truffle-nfi-native/include/* $out/jre/lib/truffle/include/
        cp -vpLR substratevm/svmbuild/native-image-root/tools/*                       $out/jre/tools/
        cp -vpR  $MX_ALT_OUTPUT_ROOT/tools/dists/chromeinspector*                     $out/jre/tools/chromeinspector/
        cp -vpR  $MX_ALT_OUTPUT_ROOT/tools/dists/truffle-profiler*                    $out/jre/tools/profiler/
        cp -vpR  $MX_ALT_OUTPUT_ROOT/truffle/linux-amd64/truffle-nfi-native/*         $out/jre/tools/truffle/
        cp -vp   $MX_ALT_OUTPUT_ROOT/truffle/dists/jdk1.8/truffle-nfi.jar             $out/jre/tools/truffle/builder/
  
        echo "name=GraalVM ${version}"                                              > $out/jre/lib/amd64/server/vm.properties
        echo -n "graal"                                                             > $out/jre/lib/jvmci/compiler-name
  