<commit_before>{ stdenv, fetchurl, scons, boost, gperftools, pcre, snappy
, zlib, libyamlcpp, sasl, openssl, libpcap, wiredtiger
}:

with stdenv.lib;

let version = "3.0.4";
    system-libraries = [
      "pcre"
      "wiredtiger"
      "boost"
      "snappy"
      "zlib"
      # "v8"
      # "stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs)
      "yaml"
    ] ++ optionals stdenv.isLinux [ "tcmalloc" ];
    buildInputs = [
      sasl boost gperftools pcre snappy
      zlib libyamlcpp sasl openssl libpcap
    ] ++ optional stdenv.is64bit wiredtiger;

    other-args = concatStringsSep " " ([
      "--c++11=on"
      "--ssl"
      #"--rocksdb" # Don't have this packaged yet
      "--wiredtiger=${if stdenv.is64bit then "on" else "off"}"
      "--js-engine=v8-3.25"
      "--use-sasl-client"
      "--variant-dir=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld
      "--extrapath=${concatStringsSep "," buildInputs}"
    ] ++ map (lib: "--use-system-${lib}") system-libraries);

in stdenv.mkDerivation rec {
  name = "mongodb-${version}";

  src = fetchurl {
    url = "http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz";
    sha256 = "0q23hvi0axc14s1ah1p67rxvi36skw34kj9ahpijx2dd2a5smrvd";<commit_msg>mongodb: Build on gcc5<commit_after>{ stdenv, fetchurl, scons, boost, gperftools, pcre, snappy
, zlib, libyamlcpp, sasl, openssl, libpcap, wiredtiger
}:

with stdenv.lib;

let version = "3.0.4";
    system-libraries = [
      "pcre"
      "wiredtiger"
      "boost"
      "snappy"
      "zlib"
      # "v8"
      # "stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs)
      "yaml"
    ] ++ optionals stdenv.isLinux [ "tcmalloc" ];
    buildInputs = [
      sasl boost gperftools pcre snappy
      zlib libyamlcpp sasl openssl libpcap
    ] ++ optional stdenv.is64bit wiredtiger;

    other-args = concatStringsSep " " ([
      "--c++11=on"
      "--ssl"
      #"--rocksdb" # Don't have this packaged yet
      "--wiredtiger=${if stdenv.is64bit then "on" else "off"}"
      "--js-engine=v8-3.25"
      "--use-sasl-client"
      "--disable-warnings-as-errors"
      "--variant-dir=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld
      "--extrapath=${concatStringsSep "," buildInputs}"
    ] ++ map (lib: "--use-system-${lib}") system-libraries);

in stdenv.mkDerivation rec {
  name = "mongodb-${version}";

  src = fetchurl {
    url = "http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz";
    sha256 = "0q23hvi0axc14s1ah1p67rxvi36skw34kj9ahpijx2dd2a5smrvd";
{'fraction_non_alphanumeric': 0.14961832061068703, 'fraction_numerical': 0.027099236641221373, 'mean_word_length': 2.798550724637681, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3854449', 'n_tokens_mistral': 1041, 'n_tokens_neox': 988, 'n_words': 217}