mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
158e1cfdd0
And don't use square brackets on such lines.
50 lines
1 KiB
Nix
50 lines
1 KiB
Nix
{ stdenv
|
|
, fetchurl
|
|
, jre
|
|
, python
|
|
, makeWrapper
|
|
, gawk
|
|
, bash
|
|
, getopt
|
|
}:
|
|
|
|
let
|
|
|
|
version = "2.1.5";
|
|
sha256 = "1zrnmwyxcrdphcbi82ps0qp81yrn1gny4iv2wa4n4mwwp8pqwxid";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "cassandra-${version}";
|
|
|
|
src = fetchurl {
|
|
inherit sha256;
|
|
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
|
|
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 = with stdenv.lib; {
|
|
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 ];
|
|
};
|
|
}
|