2015-12-15 05:08:46 +00:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, unzip, erlangR15}:
|
2013-05-23 10:17:12 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
srcs = {
|
2015-12-15 05:08:46 +00:00
|
|
|
riak = fetchurl {
|
2013-05-23 10:17:12 +01:00
|
|
|
url = "http://s3.amazonaws.com/downloads.basho.com/riak/1.3/1.3.1/riak-1.3.1.tar.gz";
|
|
|
|
sha256 = "a69093fc5df1b79f58645048b9571c755e00c3ca14dfd27f9f1cae2c6e628f01";
|
|
|
|
};
|
2015-12-15 05:08:46 +00:00
|
|
|
leveldb = fetchFromGitHub {
|
|
|
|
owner = "basho";
|
|
|
|
repo = "leveldb";
|
|
|
|
rev = "1.3.1";
|
|
|
|
sha256 = "1jvv260ic38657y4lwwcvzmhah8xai594xy19r28gkzlpra1lnbb";
|
2013-05-23 10:17:12 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "riak-1.3.1";
|
|
|
|
|
2014-06-05 01:16:50 +01:00
|
|
|
buildInputs = [unzip erlangR15];
|
2013-05-23 10:17:12 +01:00
|
|
|
|
|
|
|
src = srcs.riak;
|
|
|
|
|
|
|
|
patches = [ ./riak-1.3.1.patch ./riak-admin-1.3.1.patch ];
|
|
|
|
|
|
|
|
postUnpack = ''
|
2015-12-15 05:08:46 +00:00
|
|
|
mkdir -p $sourceRoot/deps/eleveldb/c_src/leveldb
|
|
|
|
cp -r ${srcs.leveldb}/* $sourceRoot/deps/eleveldb/c_src/leveldb
|
|
|
|
chmod 755 -R $sourceRoot/deps/eleveldb/c_src/leveldb
|
|
|
|
pushd $sourceRoot/deps/
|
2013-05-23 10:17:12 +01:00
|
|
|
mkdir riaknostic/deps
|
|
|
|
cp -R lager riaknostic/deps
|
|
|
|
cp -R getopt riaknostic/deps
|
|
|
|
cp -R meck riaknostic/deps
|
|
|
|
popd
|
2015-01-08 09:26:49 +00:00
|
|
|
patchShebangs .
|
2013-05-23 10:17:12 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make rel
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
mv rel/riak/etc rel/riak/riak-etc
|
|
|
|
mkdir -p rel/riak/etc
|
|
|
|
mv rel/riak/riak-etc rel/riak/etc/riak
|
|
|
|
mv rel/riak/* $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2014-09-13 12:51:39 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.orbitz ];
|
2013-05-23 10:17:12 +01:00
|
|
|
description = "Dynamo inspired NoSQL DB by Basho";
|
|
|
|
longDescription = ''
|
2013-06-04 16:17:54 +01:00
|
|
|
This patches the riak and riak-admin scripts to work better in Nix.
|
|
|
|
Rather than the scripts using their own location to determine where
|
|
|
|
the data, log, and etc directories should live, the scripts expect
|
2013-05-23 10:17:12 +01:00
|
|
|
RIAK_DATA_DIR, RIAK_LOG_DIR, and RIAK_ETC_DIR to be defined
|
|
|
|
and use those.
|
2013-06-10 06:11:10 +01:00
|
|
|
'';
|
2013-05-23 10:17:12 +01:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|