<commit_before>{ lib, stdenv, fetchFromGitHub, ncurses, pkg-config }:

stdenv.mkDerivation rec {
  pname = "tty-clock";
  version = "2.3";

  src = fetchFromGitHub {
    owner = "xorg62";
    repo = "tty-clock";
    rev = "v${version}";
    sha256 = "16v3pmva13skpfjja96zacjpxrwzs1nb1iqmrp2qzvdbcm9061pp";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ ncurses ];

  makeFlags = [ "PREFIX=$(out)" ];

  meta = with lib; {
    homepage = "https://github.com/xorg62/tty-clock";
    license = licenses.free;
    description = "Digital clock in ncurses";
    platforms = platforms.all;
    maintainers = [ maintainers.koral ];
  };
}<commit_msg>tty-clock: pull pending upstream inclusion fix for ncurses-6.3<commit_after>{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, pkg-config }:

stdenv.mkDerivation rec {
  pname = "tty-clock";
  version = "2.3+unstable=2021-04-07";

  src = fetchFromGitHub {
    owner = "xorg62";
    repo = "tty-clock";
    # Use unreleased version to pull in fix for ncurses-6.3
    rev = "9e00c32098524c30dac4dab701f7e33f8bc7c880";
    sha256 = "14jrzz06jr29887bxgad1x6kd26c2fnqrc26864wqm3838fpcqw0";
  };

  patches = [
    # Pull upstream patch pending inclusion fir more ncurses-6.3 fixes:
    #  https://github.com/xorg62/tty-clock/pull/100
    (fetchpatch {
      name = "ncurses-6.2.patch";
      url = "https://github.com/xorg62/tty-clock/commit/4cfd73080da1964557484da620c401745d73881c.patch";
      sha256 = "13pj1v6yrfc4vynsa746974kixfxxsy2jzzpl73c8bp7msr9d3md";
    })
  ];

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ ncurses ];

  makeFlags = [ "PREFIX=$(out)" ];

  meta = with lib; {
    homepage = "https://github.com/xorg62/tty-clock";
    license = licenses.free;
    description = "Digital clock in ncurses";
    platforms = platforms.all;
    maintainers = [ maintainers.koral ];
  };
}
{'fraction_non_alphanumeric': 0.1354110693175712, 'fraction_numerical': 0.08328855454056959, 'mean_word_length': 3.4759615384615383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '7304388', 'n_tokens_mistral': 809, 'n_tokens_neox': 723, 'n_words': 123}