nixpkgs-suyu/pkgs/servers/nosql/cassandra/2.1.nix
2016-04-28 14:17:24 +02:00

52 lines
1.1 KiB
Nix

{ stdenv
, fetchurl
, jre
, python
, makeWrapper
, gawk
, bash
, getopt
, procps
}:
let
version = "2.1.14";
sha256 = "168rg8gg1dhcjfjsr1jbfx4zj3zyqn0xi2z1j2c8jn6054486ybg";
in
stdenv.mkDerivation rec {
name = "cassandra-${version}";
src = fetchurl {
inherit sha256;
url = "mirror://apache/cassandra/${version}/apache-${name}-bin.tar.gz";
};
nativeBuildInputs = [ 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 \
--prefix PATH : ${procps}/bin
done
wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
'';
meta = with stdenv.lib; {
homepage = http://cassandra.apache.org/;
description = "A massively scalable open source NoSQL database";
platforms = platforms.all;
license = licenses.asl20;
maintainers = with maintainers; [ nckx rushmorem ];
};
}