<commit_before>{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "memtest86+-5.01";

  src = fetchurl {
    url = "http://www.memtest.org/download/5.01/${name}.tar.gz";
    sha256 = "0fch1l55753y6jkk0hj8f6vw4h1kinkn9ysp22dq5g9zjnvjf88l";
  };

  # Patch incompatiblity with GCC. Source: http://koji.fedoraproject.org/koji/buildinfo?buildID=586907
  patches = [ ./compile-fix.patch ./crash-fix.patch ./no-optimization.patch ];

  preBuild = ''
    # Really dirty hack to get Memtest to build without needing a Glibc
    # with 32-bit libraries and headers.
    if test "$system" = x86_64-linux; then
        mkdir gnu
        touch gnu/stubs-32.h
    fi
  '';

  NIX_CFLAGS_COMPILE = "-I.";

  buildFlags = "memtest.bin";

  installPhase = ''
    mkdir -p $out
    chmod -x memtest.bin<commit_msg>memtest86+: Make compatible with gcc5<commit_after>{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "memtest86+-5.01";

  src = fetchurl {
    url = "http://www.memtest.org/download/5.01/${name}.tar.gz";
    sha256 = "0fch1l55753y6jkk0hj8f6vw4h1kinkn9ysp22dq5g9zjnvjf88l";
  };

  # Patch incompatiblity with GCC. Source: http://koji.fedoraproject.org/koji/buildinfo?buildID=586907
  patches = [ ./compile-fix.patch ./crash-fix.patch ./no-optimization.patch ];

  preBuild = ''
    # Really dirty hack to get Memtest to build without needing a Glibc
    # with 32-bit libraries and headers.
    if test "$system" = x86_64-linux; then
        mkdir gnu
        touch gnu/stubs-32.h
    fi
  '';

  NIX_CFLAGS_COMPILE = "-I. -std=gnu90";

  buildFlags = "memtest.bin";

  installPhase = ''
    mkdir -p $out
    chmod -x memtest.bin
{'fraction_non_alphanumeric': 0.13268411442483263, 'fraction_numerical': 0.05782105903834449, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '396210', 'n_tokens_mistral': 699, 'n_tokens_neox': 643, 'n_words': 128}