2014-10-03 23:31:39 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, jre
|
|
|
|
, python
|
|
|
|
, makeWrapper
|
|
|
|
, gawk
|
|
|
|
, bash
|
|
|
|
, getopt
|
2015-06-25 22:55:04 +01:00
|
|
|
, procps
|
2014-10-03 23:31:39 +01:00
|
|
|
}:
|
2014-10-01 20:10:26 +01:00
|
|
|
|
2015-02-24 15:57:39 +00:00
|
|
|
let
|
|
|
|
|
2016-07-06 14:43:33 +01:00
|
|
|
version = "2.1.15";
|
|
|
|
sha256 = "1yc6r4gmxz9c4zghzn6bz5wswz7dz61w7p4x9s5gqnixfp2mlapp";
|
2015-02-24 15:57:39 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-10-01 20:10:26 +01:00
|
|
|
name = "cassandra-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-24 15:57:39 +00:00
|
|
|
inherit sha256;
|
2015-09-02 18:58:44 +01:00
|
|
|
url = "mirror://apache/cassandra/${version}/apache-${name}-bin.tar.gz";
|
2014-10-01 20:10:26 +01:00
|
|
|
};
|
|
|
|
|
2015-06-17 18:36:06 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-10-01 20:10:26 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
mv * $out
|
|
|
|
|
|
|
|
for cmd in cassandra nodetool sstablekeys sstableloader sstableupgrade
|
2014-10-03 23:31:39 +01:00
|
|
|
do wrapProgram $out/bin/$cmd \
|
|
|
|
--set JAVA_HOME ${jre} \
|
|
|
|
--prefix PATH : ${bash}/bin \
|
|
|
|
--prefix PATH : ${getopt}/bin \
|
2015-06-25 22:55:04 +01:00
|
|
|
--prefix PATH : ${gawk}/bin \
|
|
|
|
--prefix PATH : ${procps}/bin
|
2014-10-01 20:10:26 +01:00
|
|
|
done
|
|
|
|
|
2014-10-03 23:31:39 +01:00
|
|
|
wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
|
2014-10-01 20:10:26 +01:00
|
|
|
'';
|
|
|
|
|
2015-01-20 09:28:26 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-11-11 13:20:43 +00:00
|
|
|
homepage = http://cassandra.apache.org/;
|
|
|
|
description = "A massively scalable open source NoSQL database";
|
2015-11-17 20:29:29 +00:00
|
|
|
platforms = platforms.all;
|
2015-05-28 18:20:29 +01:00
|
|
|
license = licenses.asl20;
|
2015-02-24 15:57:39 +00:00
|
|
|
maintainers = with maintainers; [ nckx rushmorem ];
|
2014-10-01 20:10:26 +01:00
|
|
|
};
|
|
|
|
}
|