From 4f4fa581999fffe787882413f0cb5f00754bb2f2 Mon Sep 17 00:00:00 2001 From: Brandon Carrell Date: Tue, 14 Jul 2015 19:18:08 -0400 Subject: [PATCH] cassandra-1.2: Add package. - Add myself to maintainers. - Add package to all-packages.nix. --- lib/maintainers.nix | 1 + pkgs/servers/nosql/cassandra/1.2.nix | 52 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 54 insertions(+) create mode 100644 pkgs/servers/nosql/cassandra/1.2.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 73156ac0b25f..0c76df9c0449 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -35,6 +35,7 @@ aycanirican = "Aycan iRiCAN "; balajisivaraman = "Balaji Sivaraman"; bbenoist = "Baptist BENOIST "; + bcarrell = "Brandon Carrell "; bcdarwin = "Ben Darwin "; bdimcheff = "Brandon Dimcheff "; bennofs = "Benno Fünfstück "; diff --git a/pkgs/servers/nosql/cassandra/1.2.nix b/pkgs/servers/nosql/cassandra/1.2.nix new file mode 100644 index 000000000000..75992ceb9ef5 --- /dev/null +++ b/pkgs/servers/nosql/cassandra/1.2.nix @@ -0,0 +1,52 @@ +{ stdenv +, fetchurl +, jre +, python +, makeWrapper +, gawk +, bash +, getopt +, procps +}: + +let + + version = "1.2.19"; + sha256 = "0zkq3ggpk8ra2siar43vmrn6lmvn902p1g2lrgb46ak1vii6w30w"; + +in + +stdenv.mkDerivation rec { + name = "cassandra-${version}"; + + src = fetchurl { + inherit sha256; + url = "http://apache.cs.utah.edu/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 = with platforms; all; + license = licenses.asl20; + maintainers = with maintainers; [ bcarrell ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b294e259290..1755ac2b6738 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8798,6 +8798,7 @@ let cadvisor = callPackage ../servers/monitoring/cadvisor { }; + cassandra_1_2 = callPackage ../servers/nosql/cassandra/1.2.nix { }; cassandra_2_0 = callPackage ../servers/nosql/cassandra/2.0.nix { }; cassandra_2_1 = callPackage ../servers/nosql/cassandra/2.1.nix { }; cassandra = cassandra_2_1;