<commit_before>{ stdenv, fetchurl, xorg, ncurses, freetype, fontconfig, pkgconfig, makeWrapper
, enableDecLocator ? true
}:

stdenv.mkDerivation rec {
  name = "xterm-331";

  src = fetchurl {
    urls = [
     "ftp://ftp.invisible-island.net/xterm/${name}.tgz"
     "https://invisible-mirror.net/archives/xterm/${name}.tgz"
   ];
    sha256 = "047gk58hvj64974sg259ss5gixj7pac6halmjfz4cc6r1yimds4s";
  };

  buildInputs =
    [ xorg.libXaw xorg.xproto xorg.libXt xorg.libXext xorg.libX11 xorg.libSM xorg.libICE
      ncurses freetype fontconfig pkgconfig xorg.libXft xorg.luit makeWrapper
    ];

  patches = [
    ./sixel-256.support.patch
  ];
<commit_msg>xterm: patch from alpine to fix pty on musl<commit_after>{ stdenv, fetchurl, fetchpatch, xorg, ncurses, freetype, fontconfig, pkgconfig, makeWrapper
, enableDecLocator ? true
}:

stdenv.mkDerivation rec {
  name = "xterm-331";

  src = fetchurl {
    urls = [
     "ftp://ftp.invisible-island.net/xterm/${name}.tgz"
     "https://invisible-mirror.net/archives/xterm/${name}.tgz"
   ];
    sha256 = "047gk58hvj64974sg259ss5gixj7pac6halmjfz4cc6r1yimds4s";
  };

  buildInputs =
    [ xorg.libXaw xorg.xproto xorg.libXt xorg.libXext xorg.libX11 xorg.libSM xorg.libICE
      ncurses freetype fontconfig pkgconfig xorg.libXft xorg.luit makeWrapper
    ];

  patches = [
    ./sixel-256.support.patch
  ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl
    (fetchpatch {
      name = "posix-ptys.patch";
      url = "https://git.alpinelinux.org/cgit/aports/plain/community/xterm/posix-ptys.patch?id=3aa532e77875fa1db18c7fcb938b16647031bcc1";
      sha256 = "0czgnsxkkmkrk1idw69qxbprh0jb4sw3c24zpnqq2v76jkl7zvlr";
    });

{'fraction_non_alphanumeric': 0.12477611940298508, 'fraction_numerical': 0.061492537313432835, 'mean_word_length': 3.6946778711484596, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '6802448', 'n_tokens_mistral': 765, 'n_tokens_neox': 699, 'n_words': 96}