anchor.diff: -{ stdenv, fetchurl, makeWrapper, jre, utillinux }:
  +{ stdenv, fetchurl, makeWrapper, jre, utillinux, getopt }:
   
   with stdenv.lib;
   
  
positive.code: 
    patches = [ ./es-home.patch ];
  
    buildInputs = [ makeWrapper jre ] ++ optional (!stdenv.isDarwin) utillinux;
  
    installPhase = ''
      mkdir -p $out
  
negative.code:     # set ES_CLASSPATH and JAVA_HOME
      wrapProgram $out/bin/elasticsearch \
        --prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" \
        ${if (!stdenv.isDarwin)
          then ''--prefix PATH : "${utillinux}/bin/"''
          else ''--prefix PATH : "${getopt}/bin"''} \
        --set JAVA_HOME "${jre}"
      wrapProgram $out/bin/elasticsearch-plugin \
        --prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" \
        --set JAVA_HOME "${jre}"
    '';
  
    meta = {
  