43 lines
992 B
Nix
43 lines
992 B
Nix
{ stdenv
|
|
, fetchurl
|
|
, jre
|
|
, python
|
|
, makeWrapper
|
|
, gawk
|
|
, bash
|
|
, getopt
|
|
}:
|
|
|
|
let version = "2.1.0";
|
|
in stdenv.mkDerivation rec {
|
|
name = "cassandra-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "http://apache.cs.utah.edu/cassandra/${version}/apache-${name}-bin.tar.gz";
|
|
sha256 = "da99c4ebc8de925dc6b493443b70d2183cf3090b1aad6b6b918efa9565f264dd";
|
|
};
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir $out
|
|
mv * $out
|
|
|
|
for cmd in cassandra nodetool sstablekeys sstableloader sstableupgrade
|
|
do wrapProgram $out/bin/$cmd \
|
|
--set JAVA_HOME ${jre} \
|
|
--prefix PATH : ${bash}/bin \
|
|
--prefix PATH : ${getopt}/bin \
|
|
--prefix PATH : ${gawk}/bin
|
|
done
|
|
|
|
wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
|
|
'';
|
|
|
|
meta = {
|
|
homepage = http://cassandra.apache.org/;
|
|
description = "A massively scalable open source NoSQL database";
|
|
platforms = stdenv.lib.platforms.all;
|
|
license = stdenv.lib.licenses.asl20;
|
|
};
|
|
}
|