<commit_before>{ stdenv, lib, fetchFromGitHub, makeWrapper, perlPackages
, cursesSupport ? true
, uriFindSupport ? true
}:

let
  perlDeps =
    [ perlPackages.MIMEtools perlPackages.HTMLParser ]
    ++ lib.optional cursesSupport perlPackages.CursesUI
    ++ lib.optional uriFindSupport perlPackages.URIFind;

in stdenv.mkDerivation rec {
  pname = "extract_url";
  version = "1.6.2";

  src = fetchFromGitHub {
    owner = "m3m0ryh0l3";
    repo = "extracturl";
    rev = "v${version}";
    sha256 = "05589lp15jmcpbj4y9a3hmf6n2gsqrm4ybcyh3hd4j6pc7hmnhny";
  };

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ perlPackages.perl ] ++ perlDeps;

  makeFlags = [ "prefix=$(out)" ];
  installFlags = [ "INSTALL=install" ];

  postFixup = ''
    wrapProgram "$out/bin/extract_url" \
      --set PERL5LIB "${perlPackages.makeFullPerlPath perlDeps}"
  '';

  meta = with lib; {
    homepage = "https://www.memoryhole.net/~kyle/extract_url/";
    description = "Extracts URLs from MIME messages or plain text";
    license = licenses.bsd2;
    maintainers = [ maintainers.qyliss ];<commit_msg>extract_url: perlPackages.MIMEtools -> perlPackages.MIMETools<commit_after>{ stdenv, lib, fetchFromGitHub, makeWrapper, perlPackages
, cursesSupport ? true
, uriFindSupport ? true
}:

let
  perlDeps =
    [ perlPackages.MIMETools perlPackages.HTMLParser ]
    ++ lib.optional cursesSupport perlPackages.CursesUI
    ++ lib.optional uriFindSupport perlPackages.URIFind;

in stdenv.mkDerivation rec {
  pname = "extract_url";
  version = "1.6.2";

  src = fetchFromGitHub {
    owner = "m3m0ryh0l3";
    repo = "extracturl";
    rev = "v${version}";
    sha256 = "05589lp15jmcpbj4y9a3hmf6n2gsqrm4ybcyh3hd4j6pc7hmnhny";
  };

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ perlPackages.perl ] ++ perlDeps;

  makeFlags = [ "prefix=$(out)" ];
  installFlags = [ "INSTALL=install" ];

  postFixup = ''
    wrapProgram "$out/bin/extract_url" \
      --set PERL5LIB "${perlPackages.makeFullPerlPath perlDeps}"
  '';

  meta = with lib; {
    homepage = "https://www.memoryhole.net/~kyle/extract_url/";
    description = "Extracts URLs from MIME messages or plain text";
    license = licenses.bsd2;
    maintainers = [ maintainers.qyliss ];
{'fraction_non_alphanumeric': 0.1264521894548704, 'fraction_numerical': 0.025915996425379804, 'mean_word_length': 3.8993435448577682, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, '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': '1076731', 'n_tokens_mistral': 859, 'n_tokens_neox': 820, 'n_words': 144}