anchor.diff:    ;
   
     configureFlags =
  -    [ "--enable-nif"
  -      (lib.enableFeature withMysql "mysql")
  +    [ (lib.enableFeature withMysql "mysql")
         (lib.enableFeature withPgsql "pgsql")
         (lib.enableFeature withSqlite "sqlite")
         (lib.enableFeature withPam "pam")
  
positive.code:   LANG = "en_US.UTF-8";
  
    depsNames =
      [ "p1_cache_tab" "p1_tls" "p1_stringprep" "p1_xml" "esip" "p1_stun" "p1_yaml" "p1_utils" "jiffy" "oauth2" "xmlrpc" ]
      ++ lib.optional withMysql "p1_mysql"
      ++ lib.optional withPgsql "p1_pgsql"
      ++ lib.optional withSqlite "sqlite3"
      ++ lib.optional withPam "p1_pam"
      ++ lib.optional withZlib "p1_zlib"
      ++ lib.optionals withRiak [ "riakc" "riak_pb" "protobuffs" ]
      ++ lib.optionals withElixir [ "rebar_elixir_plugin" "elixir" ]
      ++ lib.optional withIconv "p1_iconv"
      ++ lib.optionals withLager [ "lager" "goldrush" ]
  
negative.code:     p1_logger = fetchFromGitHub {
        owner = "processone";
        repo = "p1_logger";
        rev = "1.0.0";
        sha256 = "0z11xsr139a75w09syjws4sja6ky2l9rsrwkjr6wcl7p1jz02h4r";
      };
      meck = fetchFromGitHub {
        owner = "eproxus";
        repo = "meck";
        rev = "0.8.2";
        sha256 = "0s4qbvryap46cz63awpbv5zzmlcay5pn2lixgmgvcjarqv70cbs7";
      };
      eredis = fetchFromGitHub {
        owner = "wooga";
        repo = "eredis";
        rev = "v1.0.8";
        sha256 = "10fr3kbc2nd2liggsq4y77nfirndzapcxzkjgyp06bpr9cjlvhlm";
      };
  
    };
  
  in stdenv.mkDerivation rec {
    version = "16.01";
    name = "ejabberd-${version}";
  
    src = fetchurl {
      url = "http://www.process-one.net/downloads/ejabberd/${version}/${name}.tgz";
      sha256 = "10fnsw52gxybw731yka63ma8mj39g4i0nsancwp9nlvhb2flgk72";
    };
  
    nativeBuildInputs = [ fakegit ];
  