<commit_before>{ stdenv, fetchurl }:

stdenv.mkDerivation {
  name = "procmail-3.22";

  patches = [ ./CVE-2014-3618.patch ];

  # getline is defined differently in glibc now. So rename it.
  postPatch = ''
    sed -e "s%^RM.*$%#%" -i Makefile
    sed -e "s%^BASENAME.*%\BASENAME=$out%" -i Makefile
    sed -e "s%^LIBS=.*%LIBS=-lm%" -i Makefile
    sed -e "s%getline%thisgetline%g" -i src/*.c src/*.h
  '';

  src = fetchurl {
    url = ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-3.22.tar.gz;
    sha256 = "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08";<commit_msg>procmail: unbreak "make install"<commit_after>{ stdenv, fetchurl }:

stdenv.mkDerivation {
  name = "procmail-3.22";

  patches = [ ./CVE-2014-3618.patch ];

  # getline is defined differently in glibc now. So rename it.
  # Without the .PHONY target "make install" won't install anything on Darwin.
  postPatch = ''
    sed -e "s%^RM.*$%#%" -i Makefile
    sed -e "s%^BASENAME.*%\BASENAME=$out%" -i Makefile
    sed -e "s%^LIBS=.*%LIBS=-lm%" -i Makefile
    sed -e "s%getline%thisgetline%g" -i src/*.c src/*.h
    sed -e "3i\
.PHONY: install
" -i Makefile
  '';

  src = fetchurl {
    url = ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-3.22.tar.gz;
    sha256 = "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08";
{'fraction_non_alphanumeric': 0.1750380517503805, 'fraction_numerical': 0.05251141552511415, 'mean_word_length': 3.161392405063291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4616116', 'n_tokens_mistral': 634, 'n_tokens_neox': 576, 'n_words': 112}