<commit_before>{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, ncurses, utmp, pam ? null }:

stdenv.mkDerivation rec {
  pname = "screen";
  version = "4.9.0";

  src = fetchurl {
    url = "mirror://gnu/screen/${pname}-${version}.tar.gz";
    sha256 = "1x1hqy4h47i7hk85f779lkwkm7gkq8h8mxwd0znkh5adpf0m4czr";
  };

  configureFlags= [
    "--enable-telnet"
    "--enable-pam"
    "--with-sys-screenrc=/etc/screenrc"
    "--enable-colors256"
  ];

  patches = lib.optional stdenv.hostPlatform.isMusl
    (fetchpatch {
      url = "https://gist.githubusercontent.com/yujinakayama/4608863/raw/76b9f89af5e5a2e97d9a0f36aac989fb56cf1447/gistfile1.diff";
      sha256 = "0f9bf83p8zdxaa1pr75jyf5g8xr3r8kv7cyzzbpraa1q4j15ss1p";
      stripLen = 1;
    });

  nativeBuildInputs = [
    autoreconfHook
  ];
  buildInputs = [
    ncurses
  ] ++ lib.optional stdenv.isLinux pam
    ++ lib.optional stdenv.isDarwin utmp;

  doCheck = true;

  meta = with lib; {<commit_msg>pkgsMusl.screen: fix build<commit_after>{ lib, stdenv, fetchurl, autoreconfHook, ncurses, utmp, pam ? null }:

stdenv.mkDerivation rec {
  pname = "screen";
  version = "4.9.0";

  src = fetchurl {
    url = "mirror://gnu/screen/${pname}-${version}.tar.gz";
    sha256 = "1x1hqy4h47i7hk85f779lkwkm7gkq8h8mxwd0znkh5adpf0m4czr";
  };

  configureFlags= [
    "--enable-telnet"
    "--enable-pam"
    "--with-sys-screenrc=/etc/screenrc"
    "--enable-colors256"
  ];

  nativeBuildInputs = [
    autoreconfHook
  ];
  buildInputs = [
    ncurses
  ] ++ lib.optional stdenv.isLinux pam
    ++ lib.optional stdenv.isDarwin utmp;

  doCheck = true;

  meta = with lib; {
{'fraction_non_alphanumeric': 0.14312039312039312, 'fraction_numerical': 0.06572481572481573, 'mean_word_length': 3.2981530343007917, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '1346264', 'n_tokens_mistral': 735, 'n_tokens_neox': 681, 'n_words': 95}