<commit_before>{ stdenv, fetchurl, ghostscript, perl }:

stdenv.mkDerivation rec {
  name = "groff-1.20.1";

  src = fetchurl {
    url = "mirror://gnu/groff/${name}.tar.gz";
    sha256 = "01fq5i68p4s4fc6m8i90y5d28wk1x6zh2mkw85n0qqnb6n0qfidn";
  };

  buildInputs = [ ghostscript perl ];

  doCheck = true;

  meta = {
    description = "GNU Troff, a typesetting package that reads plain text and produces formatted output";<commit_msg>Allowing cross-build of groff<commit_after>{ stdenv, fetchurl, ghostscript, perl, groff }:

stdenv.mkDerivation rec {
  name = "groff-1.20.1";

  src = fetchurl {
    url = "mirror://gnu/groff/${name}.tar.gz";
    sha256 = "01fq5i68p4s4fc6m8i90y5d28wk1x6zh2mkw85n0qqnb6n0qfidn";
  };

  buildInputs = [ ghostscript ];
  buildNativeInputs = [ perl ];

  doCheck = true;

  crossAttrs = {
    # Trick to get the build system find the proper 'native' groff
    # http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html
    preBuild = ''
      makeFlags="GROFF_BIN_PATH=${groff}/bin GROFFBIN=${groff}/bin/groff"
    '';
  };

  meta = {
    description = "GNU Troff, a typesetting package that reads plain text and produces formatted output";
{'fraction_non_alphanumeric': 0.12903225806451613, 'fraction_numerical': 0.053480475382003394, 'mean_word_length': 3.6785714285714284, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 1, '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': '5429412', 'n_tokens_mistral': 486, 'n_tokens_neox': 452, 'n_words': 90}