anchor.diff:  , ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2
   , acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex
   , gmp, readline, file, libintlperl, GetoptLong, SysVirt, numactl, xen, libapparmor
  -, getopt, perlPackages, ocamlPackages, jdk }:
  +, getopt, perlPackages, ocamlPackages
  +, javaSupport ? false, jdk ? null }:
  +
  +assert javaSupport -> jdk != null;
   
   stdenv.mkDerivation rec {
     name = "libguestfs-${version}";
  
positive.code:     # some scripts hardcore /usr/bin/env which is not available in the build env
      patchShebangs .
    '';
    configureFlags = "--disable-appliance --disable-daemon";
    patches = [ ./libguestfs-syms.patch ];
    NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2/";
    installFlags = "REALLY_INSTALL=yes";
  
negative.code:     cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig
      systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong
      SysVirt numactl xen libapparmor getopt perlPackages.ModuleBuild
    ] ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ])
      ++ stdenv.lib.optional javaSupport jdk;
  
    prePatch = ''
      # build-time scripts
  