<commit_before>{ lib, stdenv, fetchgit, mlton }:
stdenv.mkDerivation {
  pname = "redprl";
  version = "unstable-2017-03-28";

  src = fetchgit {
    url = "https://github.com/RedPRL/sml-redprl.git";
    rev = "bdf027de732e4a8d10f9f954389dfff0c822f18b";
    sha256 = "0cihwnd78d3ksxp6mppifm7xpi3fsii5mixvicajy87ggw8z305c";
    fetchSubmodules = true;
  };
  buildInputs = [ mlton ];
  patchPhase = ''
    patchShebangs ./script/
  '';
  buildPhase = ''
    ./script/mlton.sh
  '';
  installPhase = ''
    mkdir -p $out/bin
    mv ./bin/redprl $out/bin
  '';
  meta = with lib; {
    description = "A proof assistant for Nominal Computational Type Theory";
    homepage = "http://www.redprl.org/";
    license = licenses.mit;
    maintainers = with maintainers; [ acowley ];
    platforms = platforms.unix;
  };
}<commit_msg>redprl: switch to fetchFromGitHub, use postPatch<commit_after>{ lib, stdenv, fetchFromGitHub, mlton }:

stdenv.mkDerivation {
  pname = "redprl";
  version = "unstable-2017-03-28";

  src = fetchFromGitHub {
    owner = "RedPRL";
    repo = "sml-redprl";
    rev = "bdf027de732e4a8d10f9f954389dfff0c822f18b";
    fetchSubmodules = true;
    sha256 = "0cihwnd78d3ksxp6mppifm7xpi3fsii5mixvicajy87ggw8z305c";
  };

  buildInputs = [ mlton ];

  postPatch = ''
    patchShebangs ./script/
  '';

  buildPhase = ''
    ./script/mlton.sh
  '';

  installPhase = ''
    mkdir -p $out/bin
    mv ./bin/redprl $out/bin
  '';

  meta = with lib; {
    description = "A proof assistant for Nominal Computational Type Theory";
    homepage = "http://www.redprl.org/";
    license = licenses.mit;
    maintainers = with maintainers; [ acowley ];
    platforms = platforms.unix;
  };
}
{'fraction_non_alphanumeric': 0.13628318584070798, 'fraction_numerical': 0.05663716814159292, 'mean_word_length': 3.1265206812652067, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3101716', 'n_tokens_mistral': 716, 'n_tokens_neox': 660, 'n_words': 119}