<commit_before>{ lib, stdenv, fetchurl, fetchpatch, autoconf213, pkg-config, perl, python2, python3, zip, buildPackages
, which, readline, zlib, icu, cargo, rustc, llvmPackages }:

with lib;

let
  python3Env = buildPackages.python3.withPackages (p: [p.six]);
in stdenv.mkDerivation rec {
  pname = "spidermonkey";
  version = "68.10.0";

  src = fetchurl {
    url = "mirror://mozilla/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz";
    sha256 = "0azdinwqjfv2q37gqpxmfvzsk86pvsi6cjaq1310zs26gric5j1f";
  };

  patches = [
    # Backport a change from Firefox 75 that fixes finding the
    # location of clang and libclang.
    (fetchpatch {
      url = "https://hg.mozilla.org/mozilla-central/raw-rev/ccd1356fc8f1d0bfa9d896e88d3cc924425623da";
      sha256 = "005g3mfmal9nw32khrgyiv3221z7pazfhhm2qvgc8d48i2yzj3j0";
    })
  ];

  outputs = [ "out" "dev" ];
  setOutputFlags = false; # Configure script only understands --includedir

  nativeBuildInputs = [
    autoconf213
    pkg-config
    perl
    which
    python2
    zip
    cargo
    rustc
    llvmPackages.llvm
  ];

  buildInputs = [
    readline
    zlib<commit_msg>spidermonkey_68: 68.10.0 -> 68.12.0<commit_after>{ lib, stdenv, fetchurl, fetchpatch, autoconf213, pkg-config, perl, python2, python3, zip, buildPackages
, which, readline, zlib, icu, cargo, rustc, llvmPackages }:

with lib;

let
  python3Env = buildPackages.python3.withPackages (p: [p.six]);
in stdenv.mkDerivation rec {
  pname = "spidermonkey";
  version = "68.12.0";

  src = fetchurl {
    url = "mirror://mozilla/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz";
    sha256 = "1k17pi4zh9hrvkzbw4rzzw879a15hpvwriylp75wl22rl7r2nsdf";
  };

  patches = [
    # Backport a change from Firefox 75 that fixes finding the
    # location of clang and libclang.
    (fetchpatch {
      url = "https://hg.mozilla.org/mozilla-central/raw-rev/ccd1356fc8f1d0bfa9d896e88d3cc924425623da";
      sha256 = "005g3mfmal9nw32khrgyiv3221z7pazfhhm2qvgc8d48i2yzj3j0";
    })
  ];

  outputs = [ "out" "dev" ];
  setOutputFlags = false; # Configure script only understands --includedir

  nativeBuildInputs = [
    autoconf213
    pkg-config
    perl
    which
    python2
    zip
    cargo
    rustc
    llvmPackages.llvm
  ];

  buildInputs = [
    readline
    zlib
{'fraction_non_alphanumeric': 0.11192109777015437, 'fraction_numerical': 0.07547169811320754, 'mean_word_length': 3.495183044315992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3131950', 'n_tokens_mistral': 1024, 'n_tokens_neox': 914, 'n_words': 167}