anchor.diff:        path = [ pkgs.inetutils ];
         environment = {
           ES_HOME = cfg.dataDir;
  -        ES_JAVA_OPTS = toString ( optional (!es6) [ "-Des.path.conf=${configDir}" ]
  -                                  ++ cfg.extraJavaOptions);
  +        ES_JAVA_OPTS = toString (optional (!es6) [ "-Des.path.conf=${configDir}" ]
  +          ++ cfg.extraJavaOptions);
         } // optionalAttrs es6 {
           ES_PATH_CONF = configDir;
         };
  
positive.code:     postBuild = "${pkgs.coreutils}/bin/mkdir -p $out/plugins";
    };
  
  in {
  
    ###### interface
  
  
negative.code: 
      extraCmdLineOptions = mkOption {
        description = "Extra command line options for the elasticsearch launcher.";
        default = [ ];
        type = types.listOf types.str;
      };
  
      extraJavaOptions = mkOption {
        description = "Extra command line options for Java.";
        default = [ ];
        type = types.listOf types.str;
        example = [ "-Djava.net.preferIPv4Stack=true" ];
      };
  
      plugins = mkOption {
        description = "Extra elasticsearch plugins";
        default = [ ];
        type = types.listOf types.package;
        example = lib.literalExample "[ pkgs.elasticsearchPlugins.discovery-ec2 ]";
      };
  