<commit_before>{ stdenv, fetchurl }:

let

  libc = if stdenv.gcc.libc or null != null then stdenv.gcc.libc else "/usr";

in

stdenv.mkDerivation rec {
  name = "perl-5.16.1";

  src = fetchurl {
    url = "mirror://cpan/src/${name}.tar.gz";
    sha256 = "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km";
  };

  patches =
    [ # Do not look in /usr etc. for dependencies.
      ./no-sys-dirs.patch
    ]
    ++ stdenv.lib.optional stdenv.isDarwin ./no-libutil.patch;

  # Build a thread-safe Perl with a dynamic libperls.o.  We need the
  # "installstyle" option to ensure that modules are put under
  # $out/lib/perl5 - this is the general default, but because $out
  # contains the string "perl", Configure would select $out/lib.
  # Miniperl needs -lm. perl needs -lrt.
  configureFlags =
    [ "-de"
      "-Dcc=gcc"
      "-Uinstallusrbinperl"
      "-Dinstallstyle=lib/perl5"
      "-Duseshrplib"
      "-Dlocincpth=${libc}/include"
      "-Dloclibpth=${libc}/lib"
    ]
    ++ stdenv.lib.optional (stdenv ? glibc) "-Dusethreads";

  configureScript = "${stdenv.shell} ./Configure";<commit_msg>perl: Update to 5.16.2<commit_after>{ stdenv, fetchurl }:

let

  libc = if stdenv.gcc.libc or null != null then stdenv.gcc.libc else "/usr";

in

stdenv.mkDerivation rec {
  name = "perl-5.16.2";

  src = fetchurl {
    url = "mirror://cpan/src/${name}.tar.gz";
    sha256 = "03nh8bqnjsdd5izjv3n2yfcxw4ck0llwww36jpbjbjgixwpqpy4f";
  };

  patches =
    [ # Do not look in /usr etc. for dependencies.
      ./no-sys-dirs.patch
    ]
    ++ stdenv.lib.optional stdenv.isDarwin ./no-libutil.patch;

  # Build a thread-safe Perl with a dynamic libperls.o.  We need the
  # "installstyle" option to ensure that modules are put under
  # $out/lib/perl5 - this is the general default, but because $out
  # contains the string "perl", Configure would select $out/lib.
  # Miniperl needs -lm. perl needs -lrt.
  configureFlags =
    [ "-de"
      "-Dcc=gcc"
      "-Uinstallusrbinperl"
      "-Dinstallstyle=lib/perl5"
      "-Duseshrplib"
      "-Dlocincpth=${libc}/include"
      "-Dloclibpth=${libc}/lib"
    ]
    ++ stdenv.lib.optional (stdenv ? glibc) "-Dusethreads";

  configureScript = "${stdenv.shell} ./Configure";
{'fraction_non_alphanumeric': 0.1406741573033708, 'fraction_numerical': 0.023370786516853932, 'mean_word_length': 2.8379310344827586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '5895039', 'n_tokens_mistral': 903, 'n_tokens_neox': 839, 'n_words': 194}