<commit_before>{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff }:
 
stdenv.mkDerivation rec {
  name = "man-db-2.7.1";
  
  src = fetchurl {
    url = "mirror://savannah/man-db/${name}.tar.xz";
    sha256 = "03ly0hbpgjnag576rgccanaisn7f6422q5qxrj64vyzslc2651y4";
  };
  
  buildInputs = [ pkgconfig ]
             ++ stdenv.lib.optional (!stdenv.isDarwin) libpipeline
             ++ [ db groff ];
  
  configureFlags = [
    "--disable-setuid"
    "--sysconfdir=/etc"
    "--localstatedir=/var"
    "--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
  ];

  installFlags = [ "DESTDIR=\${out}" ];

  postInstall = ''
    mv $out/$out/* $out
    DIR=$out/$out
    while rmdir $DIR 2>/dev/null; do
      DIR="$(dirname "$DIR")"
    done
  '';
<commit_msg>Revert "man-db: dont use libpipeline on darwin, causes build failure"<commit_after>{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff }:
 
stdenv.mkDerivation rec {
  name = "man-db-2.7.1";
  
  src = fetchurl {
    url = "mirror://savannah/man-db/${name}.tar.xz";
    sha256 = "03ly0hbpgjnag576rgccanaisn7f6422q5qxrj64vyzslc2651y4";
  };
  
  buildInputs = [ pkgconfig libpipeline db groff ];
  
  configureFlags = [
    "--disable-setuid"
    "--sysconfdir=/etc"
    "--localstatedir=/var"
    "--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
  ];

  installFlags = [ "DESTDIR=\${out}" ];

  postInstall = ''
    mv $out/$out/* $out
    DIR=$out/$out
    while rmdir $DIR 2>/dev/null; do
      DIR="$(dirname "$DIR")"
    done
  '';

{'fraction_non_alphanumeric': 0.1754503002001334, 'fraction_numerical': 0.03468979319546364, 'mean_word_length': 2.826530612244898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4804288', 'n_tokens_mistral': 639, 'n_tokens_neox': 590, 'n_words': 95}