<commit_before>{ lib, stdenv
, fetchFromGitHub
, SDL2
, SDL2_ttf
, libpcap
, vde2
, pcre
}:

stdenv.mkDerivation rec {
  pname = "simh";
  version = "3.11-1";

  src = fetchFromGitHub {
    owner = "simh";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-65+YfOWpVXPeT64TZcSaWJY+ODQ0q/pwF9jb8xGdpIs=";
  };

  buildInputs = [ SDL2 SDL2_ttf libpcap vde2 pcre ];

  dontConfigure = true;

  makeFlags = [ "GCC=${stdenv.cc.targetPrefix}cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ];
<commit_msg>simh: add -fcommon workaround<commit_after>{ lib, stdenv
, fetchFromGitHub
, SDL2
, SDL2_ttf
, libpcap
, vde2
, pcre
}:

stdenv.mkDerivation rec {
  pname = "simh";
  version = "3.11-1";

  src = fetchFromGitHub {
    owner = "simh";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-65+YfOWpVXPeT64TZcSaWJY+ODQ0q/pwF9jb8xGdpIs=";
  };

  buildInputs = [ SDL2 SDL2_ttf libpcap vde2 pcre ];

  dontConfigure = true;

  # Workaround to build against upstream gcc-10 and clang-11.
  # Can be removed when next release contains
  #    https://github.com/simh/simh/issues/794
  NIX_CFLAGS_COMPILE = [ "-fcommon" ];

  makeFlags = [ "GCC=${stdenv.cc.targetPrefix}cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ];

{'fraction_non_alphanumeric': 0.1480562448304384, 'fraction_numerical': 0.04714640198511166, 'mean_word_length': 3.618320610687023, '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': '4929513', 'n_tokens_mistral': 578, 'n_tokens_neox': 526, 'n_words': 95}