<commit_before>{ stdenv, fetchurl, unzip, erlang }:

let
  srcs = {
     riak = fetchurl {
      url = "http://s3.amazonaws.com/downloads.basho.com/riak/1.3/1.3.1/riak-1.3.1.tar.gz";
      sha256 = "a69093fc5df1b79f58645048b9571c755e00c3ca14dfd27f9f1cae2c6e628f01";
    };
     leveldb = fetchurl {
      url = "https://github.com/basho/leveldb/archive/1.3.1.zip";
      sha256 = "dc48ba2b44fca11888ea90695d385c494e1a3abd84a6b266b07fdc160ab2ef64";
    };
  };
in
stdenv.mkDerivation rec {
  name = "riak-1.3.1";

  buildInputs = [unzip erlang];

  src = srcs.riak;

  patches = [ ./riak-1.3.1.patch ./riak-admin-1.3.1.patch ];

  postUnpack = ''
    ln -sv ${srcs.leveldb} $sourceRoot/deps/eleveldb/c_src/leveldb.zip
    pushd $sourceRoot/deps/eleveldb/c_src/
    unzip leveldb.zip
    mv leveldb-* leveldb
    cd ../../
    mkdir riaknostic/deps
    cp -R lager riaknostic/deps
    cp -R getopt riaknostic/deps
    cp -R meck riaknostic/deps
    popd
    patchShebangs .
  '';

  buildPhase = ''
    make rel
  '';

  doCheck = false;
<commit_msg>Pin 1.3.1 to R15B03, riak does not work with R16<commit_after>{ stdenv, fetchurl, unzip, erlangR15B03 }:

let
  srcs = {
     riak = fetchurl {
      url = "http://s3.amazonaws.com/downloads.basho.com/riak/1.3/1.3.1/riak-1.3.1.tar.gz";
      sha256 = "a69093fc5df1b79f58645048b9571c755e00c3ca14dfd27f9f1cae2c6e628f01";
    };
     leveldb = fetchurl {
      url = "https://github.com/basho/leveldb/archive/1.3.1.zip";
      sha256 = "dc48ba2b44fca11888ea90695d385c494e1a3abd84a6b266b07fdc160ab2ef64";
    };
  };
in
stdenv.mkDerivation rec {
  name = "riak-1.3.1";

  buildInputs = [unzip erlangR15B03];

  src = srcs.riak;

  patches = [ ./riak-1.3.1.patch ./riak-admin-1.3.1.patch ];

  postUnpack = ''
    ln -sv ${srcs.leveldb} $sourceRoot/deps/eleveldb/c_src/leveldb.zip
    pushd $sourceRoot/deps/eleveldb/c_src/
    unzip leveldb.zip
    mv leveldb-* leveldb
    cd ../../
    mkdir riaknostic/deps
    cp -R lager riaknostic/deps
    cp -R getopt riaknostic/deps
    cp -R meck riaknostic/deps
    popd
    patchShebangs .
  '';

  buildPhase = ''
    make rel
  '';

  doCheck = false;

{'fraction_non_alphanumeric': 0.1395240317312179, 'fraction_numerical': 0.10499300046663555, 'mean_word_length': 2.6338983050847458, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3608339', 'n_tokens_mistral': 1074, 'n_tokens_neox': 965, 'n_words': 141}