2014-10-04 02:31:39 +04:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, jre
|
|
|
|
, python
|
|
|
|
, makeWrapper
|
|
|
|
, gawk
|
|
|
|
, bash
|
|
|
|
, getopt
|
|
|
|
}:
|
2014-10-01 23:10:26 +04:00
|
|
|
|
2015-02-24 18:57:39 +03:00
|
|
|
let
|
|
|
|
|
2015-04-03 20:03:03 +03:00
|
|
|
version = "2.0.14";
|
|
|
|
sha256 = "06vsv141dk5i5z47nh1glkqpscjl5fgynbhaxb4yjab9lskwv5jk";
|
2015-02-24 18:57:39 +03:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-10-01 23:10:26 +04:00
|
|
|
name = "cassandra-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-24 18:57:39 +03:00
|
|
|
inherit sha256;
|
2014-10-01 23:10:26 +04:00
|
|
|
url = "http://apache.cs.utah.edu/cassandra/${version}/apache-${name}-bin.tar.gz";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
mv * $out
|
|
|
|
|
|
|
|
for cmd in cassandra nodetool sstablekeys sstableloader sstableupgrade
|
2014-10-04 02:31:39 +04:00
|
|
|
do wrapProgram $out/bin/$cmd \
|
|
|
|
--set JAVA_HOME ${jre} \
|
|
|
|
--prefix PATH : ${bash}/bin \
|
|
|
|
--prefix PATH : ${getopt}/bin \
|
|
|
|
--prefix PATH : ${gawk}/bin
|
2014-10-01 23:10:26 +04:00
|
|
|
done
|
|
|
|
|
2014-10-04 02:31:39 +04:00
|
|
|
wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
|
2014-10-01 23:10:26 +04:00
|
|
|
'';
|
|
|
|
|
2015-01-20 12:28:26 +03:00
|
|
|
meta = with stdenv.lib; {
|
2014-11-11 16:20:43 +03:00
|
|
|
homepage = http://cassandra.apache.org/;
|
|
|
|
description = "A massively scalable open source NoSQL database";
|
2015-01-20 12:28:26 +03:00
|
|
|
platforms = with platforms; all;
|
|
|
|
license = with licenses; asl20;
|
2015-02-24 18:57:39 +03:00
|
|
|
maintainers = with maintainers; [ nckx rushmorem ];
|
2014-10-01 23:10:26 +04:00
|
|
|
};
|
|
|
|
}
|