diff --git a/README.md b/README.md index bbcc7bab..46ba0d12 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,13 @@ to send changes for review. Please sign the [Contributor License Agreement](https://docs.google.com/spreadsheet/viewform?formkey=dFNiOFROLXJBbFBmMkQtb1hNMWhUUnc6MQ) when you send your first change for review. +## Setup + +This repo includes a `shell.nix` file for development. +To get started, install nix, cd into the root of the repo, and run `shell.nix`. +You'll be provided with a shell that includes everything needed for development. +Note that this will take some time on the first invocation. + ## License Copyright © 2015 The GoHBase Authors. All rights reserved. Use of this source code is governed by the Apache License 2.0 that can be found in the [COPYING](COPYING) file. diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..21796f79 --- /dev/null +++ b/shell.nix @@ -0,0 +1,33 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + + packages = with pkgs; [ + jdk8 + hbase_2_4 + hadoop + + go_1_23 + protoc-gen-go + protobuf + + procps + ]; + + shellHook = '' + export JAVA_HOME="${pkgs.jdk8}" + export HBASE_HOME="${pkgs.hbase}" + export HBASE_LOG_DIR=logs + + # Debugging & Useful + alias hbase-shell="$HBASE_HOME/bin/hbase shell" + alias hbase-start="$HBASE_HOME/bin/start-hbase.sh" + alias hbase-stop="$HBASE_HOME/bin/start-hbase.sh" + alias ports="sudo lsof -i -P -n | grep LISTEN" + ''; + + exitHook = '' + $HBASE_HOME/bin/stop-hbase.sh + ''; + +}