3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/nosql/cassandra/2.1.nix

53 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv
, fetchurl
, jre
, python
, makeWrapper
, gawk
, bash
, getopt
, procps
}:
2014-10-01 20:10:26 +01:00
let
version = "2.1.9";
sha256 = "10nwh7kx4k0kkfvl3sf22v3x58q37b81lkr6s6gvzkq67f6mjcvs";
in
stdenv.mkDerivation rec {
2014-10-01 20:10:26 +01:00
name = "cassandra-${version}";
src = fetchurl {
inherit sha256;
url = "mirror://apache/cassandra/${version}/apache-${name}-bin.tar.gz";
2014-10-01 20:10:26 +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
do wrapProgram $out/bin/$cmd \
--set JAVA_HOME ${jre} \
--prefix PATH : ${bash}/bin \
--prefix PATH : ${getopt}/bin \
--prefix PATH : ${gawk}/bin \
--prefix PATH : ${procps}/bin
2014-10-01 20:10:26 +01:00
done
wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
2014-10-01 20:10:26 +01: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";
platforms = with platforms; all;
license = licenses.asl20;
maintainers = with maintainers; [ nckx rushmorem ];
2014-10-01 20:10:26 +01:00
};
}