anchor.diff:  
       mkdir $jrePath/lib/${architecture}/plugins
       ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
  +
  +    mkdir -p $out/nix-support
  +    echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
  +
  +    # Set JAVA_HOME automatically.
  +    cat <<EOF >> $out/nix-support/setup-hook
  +    if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
  +    EOF
     '';
   
     inherit installjdk pluginSupport;
  
positive.code: 
    passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
  
    meta.license = "unfree";
  }
  
negative.code:       "";
  in
  
  let result = stdenv.mkDerivation rec {
    name =
      if installjdk then "oraclejdk-${productVersion}u${patchVersion}" else "oraclejre-${productVersion}u${patchVersion}";
  
  