From 17aae5742d815732e45f547d335dd832dd5b6636 Mon Sep 17 00:00:00 2001 From: Francesco Lazzarino Date: Wed, 1 Oct 2014 14:10:26 -0500 Subject: [PATCH] Apache Cassandra 2.1.0 --- pkgs/servers/nosql/cassandra/default.nix | 31 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/servers/nosql/cassandra/default.nix diff --git a/pkgs/servers/nosql/cassandra/default.nix b/pkgs/servers/nosql/cassandra/default.nix new file mode 100644 index 00000000000..4a0511de066 --- /dev/null +++ b/pkgs/servers/nosql/cassandra/default.nix @@ -0,0 +1,31 @@ +{stdenv, fetchurl, jre, python, makeWrapper}: + +let version = "2.1.0"; +in stdenv.mkDerivation rec { + name = "cassandra-${version}"; + + src = fetchurl { + url = "http://apache.cs.utah.edu/cassandra/${version}/apache-${name}-bin.tar.gz"; + sha256 = "da99c4ebc8de925dc6b493443b70d2183cf3090b1aad6b6b918efa9565f264dd"; + }; + + buildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir $out + mv * $out + + for cmd in cassandra nodetool sstablekeys sstableloader sstableupgrade + do wrapProgram $out/bin/$cmd --set JAVA_HOME ${jre} + done + + wrapProgram $out/bin/cqlsh --prefix PATH : ${python} + ''; + + meta = { + homepage = "http://cassandra.apache.org/"; + description = "Apache Cassandraâ„¢ is a massively scalable open source NoSQL database."; + platforms = stdenv.lib.platforms.all; + license = stdenv.lib.licenses.asl20; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd19493ce3e..04877a3a26f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7093,6 +7093,8 @@ let sslSupport = true; }); + cassandra = callPackage ../servers/nosql/cassandra { }; + apache-jena = callPackage ../servers/nosql/apache-jena/binary.nix { java = icedtea7_jdk; };