<commit_before>{ lib, stdenv, fetchurl, pkgconfig, libtool

, mouseSupport ? false
, unicode ? true

, gpm
}:

stdenv.mkDerivation rec {
  name = "ncurses-6.0";

  src = fetchurl {
    url = "mirror://gnu/ncurses/${name}.tar.gz";
    sha256 = "0q3jck7lna77z5r42f13c4xglc7azd19pxfrjrpgp2yf615w4lgm";
  };

  patches = [ ./clang.patch ];

  outputs = [ "dev" "lib" "out" ];
  setOutputFlags = false; # some aren't supported

  configureFlags = [
    "--with-shared"
    "--with-cxx-shared"
    "--with-libtool"
    "--without-debug"
    "--enable-overwrite"  # Needed for proper header installation
    "--enable-pc-files"
    "--enable-symlinks"
    "--libdir=$(lib)/lib" "--includedir=$(dev)/include" "--bindir=$(dev)/bin"
  ] ++ lib.optional unicode "--enable-widec";

  nativeBuildInputs = [ pkgconfig libtool ];
  buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;

  preConfigure = ''
    export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig"
    mkdir -p "$PKG_CONFIG_LIBDIR"
    configureFlagsArray+=("--with-pkg-config-libdir=$PKG_CONFIG_LIBDIR")
  '' + lib.optionalString stdenv.isCygwin ''
    sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure
  '';

  selfNativeBuildInput = true;

  enableParallelBuilding = true;

  doCheck = false;
<commit_msg>ncurses: split also man output (3-4 MB)<commit_after>{ lib, stdenv, fetchurl, pkgconfig, libtool

, mouseSupport ? false
, unicode ? true

, gpm
}:

stdenv.mkDerivation rec {
  name = "ncurses-6.0";

  src = fetchurl {
    url = "mirror://gnu/ncurses/${name}.tar.gz";
    sha256 = "0q3jck7lna77z5r42f13c4xglc7azd19pxfrjrpgp2yf615w4lgm";
  };

  patches = [ ./clang.patch ];

  outputs = [ "dev" "lib" "out" "man" ];
  setOutputFlags = false; # some aren't supported

  configureFlags = [
    "--with-shared"
    "--with-cxx-shared"
    "--with-libtool"
    "--without-debug"
    "--enable-overwrite"  # Needed for proper header installation
    "--enable-pc-files"
    "--enable-symlinks"
    "--libdir=$(lib)/lib" "--includedir=$(dev)/include" "--bindir=$(dev)/bin" "--mandir=$(man)/share/man"
  ] ++ lib.optional unicode "--enable-widec";

  nativeBuildInputs = [ pkgconfig libtool ];
  buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;

  preConfigure = ''
    export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig"
    mkdir -p "$PKG_CONFIG_LIBDIR"
    configureFlagsArray+=("--with-pkg-config-libdir=$PKG_CONFIG_LIBDIR")
  '' + lib.optionalString stdenv.isCygwin ''
    sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure
  '';

  selfNativeBuildInput = true;

  enableParallelBuilding = true;

  doCheck = false;

{'fraction_non_alphanumeric': 0.1667953667953668, 'fraction_numerical': 0.019305019305019305, 'mean_word_length': 3.482698961937716, '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': '969813', 'n_tokens_mistral': 1001, 'n_tokens_neox': 955, 'n_words': 166}