blob: df85044b8d1a7c81b8363a9df9ea7818a5ffec4c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{ stdenv, fetchurl, fetchFromGitHub, unzip, erlangR15}:
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 = fetchFromGitHub {
owner = "basho";
repo = "leveldb";
rev = "1.3.1";
sha256 = "1jvv260ic38657y4lwwcvzmhah8xai594xy19r28gkzlpra1lnbb";
};
};
in
stdenv.mkDerivation rec {
name = "riak-1.3.1";
buildInputs = [unzip erlangR15];
src = srcs.riak;
patches = [ ./riak-1.3.1.patch ./riak-admin-1.3.1.patch ];
postUnpack = ''
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/
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;
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 = {
maintainers = [ stdenv.lib.maintainers.orbitz ];
description = "Dynamo inspired NoSQL DB by Basho";
longDescription = ''
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
RIAK_DATA_DIR, RIAK_LOG_DIR, and RIAK_ETC_DIR to be defined
and use those.
'';
platforms = stdenv.lib.platforms.all;
};
}
|