<commit_before>{ stdenv, fetchurl, kernel, perl, makeWrapper }:

# BLCR 0.8.5 should works for kernel version up to 3.7.1
# BLCR 0.8.6 should works for kernel version up to 3.17.x

assert stdenv.isLinux;
assert builtins.compareVersions "3.18" kernel.version == 1;

stdenv.mkDerivation {
  name = "blcr_${kernel.version}-0.8.6pre4";

  src = fetchurl {
    url = https://upc-bugs.lbl.gov/blcr-dist/blcr-0.8.6_b4.tar.gz;
    sha256 = "1a3gdhdnmk592jc652szxgfz8rjd8dax5jwxfsypiqx5lgkj3m21";
  };

  buildInputs = [ perl makeWrapper ];<commit_msg>blcr: drop support for kernel 3.12<commit_after>{ stdenv, lib, fetchurl, kernel, perl, makeWrapper }:

# BLCR 0.8.5 should works for kernel version up to 3.7.1
# BLCR 0.8.6 should works for kernel version up to 3.17.x

assert stdenv.isLinux;
assert builtins.compareVersions "3.18" kernel.version == 1;

# it doesn't compile anymore on 3.12
assert lib.versionAtLeast kernel.version "3.14";

stdenv.mkDerivation {
  name = "blcr_${kernel.version}-0.8.6pre4";

  src = fetchurl {
    url = https://upc-bugs.lbl.gov/blcr-dist/blcr-0.8.6_b4.tar.gz;
    sha256 = "1a3gdhdnmk592jc652szxgfz8rjd8dax5jwxfsypiqx5lgkj3m21";
  };

  buildInputs = [ perl makeWrapper ];
{'fraction_non_alphanumeric': 0.12844036697247707, 'fraction_numerical': 0.07756463719766472, 'mean_word_length': 3.958677685950413, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3091779', 'n_tokens_mistral': 538, 'n_tokens_neox': 493, 'n_words': 106}