<commit_before>{ stdenv, fetchurl, perl, gnum4, ncurses, openssl }:

let version = "R15B01"; in

stdenv.mkDerivation {
  name = "erlang-" + version;
  
  src = fetchurl {
    url = "http://www.erlang.org/download/otp_src_" + version + ".tar.gz";
    sha256 = "1pmb3hk51p6dwsspxx40qs7gjfyhxjjc3290qk6w1wwa6bkpskzr";
  };
  
  buildInputs = [ perl gnum4 ncurses openssl ];
  
  patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
  
  preConfigure = ''
    export HOME=$PWD/../
    sed -e s@/bin/pwd@pwd@g -i otp_build
  '';
  
  configureFlags = "--with-ssl=${openssl}";
}<commit_msg>Adding optional wx (GUI) support for Erlang, which enables the graphical debugger although pman (the process manager) fails to start.<commit_after>{ stdenv, fetchurl, perl, gnum4, ncurses, openssl
, wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }:

assert wxSupport -> mesa != null && wxGTK != null && xlibs != null;

let version = "R15B01"; in

stdenv.mkDerivation {
  name = "erlang-" + version;
  
  src = fetchurl {
    url = "http://www.erlang.org/download/otp_src_" + version + ".tar.gz";
    sha256 = "1pmb3hk51p6dwsspxx40qs7gjfyhxjjc3290qk6w1wwa6bkpskzr";
  };
  
  buildInputs = 
    [ perl gnum4 ncurses openssl
    ] ++ stdenv.lib.optional wxSupport [ mesa wxGTK xlibs.libX11 ];
  
  patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
  
  preConfigure = ''
    export HOME=$PWD/../
    sed -e s@/bin/pwd@pwd@g -i otp_build
  '';
  
  configureFlags = "--with-ssl=${openssl}";
}
{'fraction_non_alphanumeric': 0.15234375, 'fraction_numerical': 0.032552083333333336, 'mean_word_length': 3.34180790960452, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2487670', 'n_tokens_mistral': 658, 'n_tokens_neox': 619, 'n_words': 128}