about summary refs log tree commit diff
path: root/pkgs/servers/hbase
diff options
context:
space:
mode:
authorillustris <rharikrishnan95@gmail.com>2022-03-29 01:49:17 +0530
committerillustris <rharikrishnan95@gmail.com>2022-04-18 02:02:43 +0530
commit2b0c299990e4d2c392e2041240bb05797f23c146 (patch)
tree3cfdbec3c380a1ecbad3fd6137d04643811d8f9e /pkgs/servers/hbase
parent6701dd6a4dd5b91314a7ea8890620c7b16a0e058 (diff)
hbase: 0.98.24 -> 2.4.11
Diffstat (limited to 'pkgs/servers/hbase')
-rw-r--r--pkgs/servers/hbase/default.nix69
1 files changed, 51 insertions, 18 deletions
diff --git a/pkgs/servers/hbase/default.nix b/pkgs/servers/hbase/default.nix
index 32d2c09de97fb..46521da885390 100644
--- a/pkgs/servers/hbase/default.nix
+++ b/pkgs/servers/hbase/default.nix
@@ -1,22 +1,55 @@
-{ lib, stdenv, fetchurl, makeWrapper }:
-stdenv.mkDerivation rec {
-  pname = "hbase";
-  version = "0.98.24";
+{ lib
+, stdenv
+, fetchurl
+, makeWrapper
+, jdk8_headless
+, jdk11_headless
+, nixosTests
+}:
 
-  src = fetchurl {
-    url = "mirror://apache/hbase/${version}/hbase-${version}-hadoop2-bin.tar.gz";
-    sha256 = "0kz72wqsii09v9hxkw10mzyvjhji5sx3l6aijjalgbybavpcxglb";
-  };
+let common = { version, hash, jdk ? jdk11_headless, tests }:
+  stdenv.mkDerivation rec {
+    pname = "hbase";
+    inherit version;
+
+    src = fetchurl {
+      url = "mirror://apache/hbase/${version}/hbase-${version}-bin.tar.gz";
+      inherit hash;
+    };
+
+    nativeBuildInputs = [ makeWrapper ];
+    installPhase = ''
+      mkdir -p $out
+      cp -R * $out
+      wrapProgram $out/bin/hbase --set-default JAVA_HOME ${jdk.home}
+    '';
+
+    passthru = { inherit tests; };
 
-  nativeBuildInputs = [ makeWrapper ];
-  installPhase = ''
-    mkdir -p $out
-    cp -R * $out
-  '';
-  meta = with lib; {
-    description = "A distributed, scalable, big data store";
-    homepage = "https://hbase.apache.org";
-    license = licenses.asl20;
-    platforms = lib.platforms.linux;
+    meta = with lib; {
+      description = "A distributed, scalable, big data store";
+      homepage = "https://hbase.apache.org";
+      license = licenses.asl20;
+      maintainers = with lib.maintainers; [ illustris ];
+      platforms = lib.platforms.linux;
+    };
+  };
+in
+{
+  hbase_1_7 = common {
+    version = "1.7.1";
+    hash = "sha256-DrH2G79QLT8L0YTTmAGC9pUWU8semSaTOsrsQRCI2rY=";
+    jdk = jdk8_headless;
+    tests.standalone = nixosTests.hbase1;
+  };
+  hbase_2_4 = common {
+    version = "2.4.11";
+    hash = "sha256-m0vjUtPaj8czHHh+rQNJJgrFAM744cHd06KE0ut7QeU=";
+    tests.standalone = nixosTests.hbase2;
+  };
+  hbase_3_0 = common {
+    version = "3.0.0-alpha-2";
+    hash = "sha256-QPvgO1BeFWvMT5PdUm/SL92ZgvSvYIuJbzolbBTenz4=";
+    tests.standalone = nixosTests.hbase3;
   };
 }