<commit_before>{ stdenv, fetchurl, tcl, tk, libX11, libiconvOrLibc }:

assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";

stdenv.mkDerivation rec {
  name = "tkgate-2.0-b10";

  src = fetchurl {
    url = "http://www.tkgate.org/downloads/${name}.tgz";
    sha256 = "0mr061xcwjmd8nhyjjcw2dzxqi53hv9xym9xsp0cw98knz2skxjf";
  };

  buildInputs = [ tcl tk libX11 ];

  dontStrip = true;

  patchPhase = ''
    sed -i configure \
      -e 's|TKGATE_INCDIRS=.*|TKGATE_INCDIRS="${tcl}/include ${tk}/include ${libiconvOrLibc}/include"|' \
      -e 's|TKGATE_LIBDIRS=.*|TKGATE_LIBDIRS="${tcl}/lib ${tk}/lib ${libiconvOrLibc}/lib"|'
    sed -i options.h \
      -e 's|.* #define TCL_LIBRARY .*|#define TCL_LIBRARY "${tcl}/${tcl.libdir}"|' \
      -e 's|.* #define TK_LIBRARY .*|#define TK_LIBRARY "${tk}/lib/${tk.libPrefix}"|'
  '';

  meta = {
    description = "Event driven digital circuit simulator with a TCL/TK-based graphical editor";
    homepage = "http://www.tkgate.org/";
    license = "GPLv2+";
    maintainers = [ stdenv.lib.maintainers.simons ];
    platforms = stdenv.lib.platforms.linux;
  };
}<commit_msg>tkgate-2.x: mark 'broken' because the application segfaults after startup<commit_after>{ stdenv, fetchurl, tcl, tk, libX11, libiconvOrLibc }:

assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";

stdenv.mkDerivation rec {
  name = "tkgate-2.0-b10";

  src = fetchurl {
    url = "http://www.tkgate.org/downloads/${name}.tgz";
    sha256 = "0mr061xcwjmd8nhyjjcw2dzxqi53hv9xym9xsp0cw98knz2skxjf";
  };

  buildInputs = [ tcl tk libX11 ];

  dontStrip = true;

  patchPhase = ''
    sed -i configure \
      -e 's|TKGATE_INCDIRS=.*|TKGATE_INCDIRS="${tcl}/include ${tk}/include ${libiconvOrLibc}/include"|' \
      -e 's|TKGATE_LIBDIRS=.*|TKGATE_LIBDIRS="${tcl}/lib ${tk}/lib ${libiconvOrLibc}/lib"|'
    sed -i options.h \
      -e 's|.* #define TCL_LIBRARY .*|#define TCL_LIBRARY "${tcl}/${tcl.libdir}"|' \
      -e 's|.* #define TK_LIBRARY .*|#define TK_LIBRARY "${tk}/lib/${tk.libPrefix}"|'
  '';

  meta = {
    description = "Event driven digital circuit simulator with a TCL/TK-based graphical editor";
    homepage = "http://www.tkgate.org/";
    license = "GPLv2+";
    maintainers = [ stdenv.lib.maintainers.simons ];
    platforms = stdenv.lib.platforms.linux;
    broken = true;
  };
}
{'fraction_non_alphanumeric': 0.18007662835249041, 'fraction_numerical': 0.02852277564921243, 'mean_word_length': 3.5366795366795367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '671678', 'n_tokens_mistral': 1031, 'n_tokens_neox': 968, 'n_words': 164}