From bed5ac28ae6cab0291460ff7496d0b5f5dbc1542 Mon Sep 17 00:00:00 2001 From: Connor Luckett Date: Tue, 25 Mar 2025 15:11:39 -0700 Subject: [PATCH 1/4] Root: Add Nix-Shell File --- README.md | 7 +++++++ shell.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 shell.nix 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..daa41152 --- /dev/null +++ b/shell.nix @@ -0,0 +1,28 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + + packages = with pkgs; [ + hbase_2_4 + jdk8 + hadoop + go_1_24 + 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" + ''; + + exitHook = '' + $HBASE_HOME/bin/stop-hbase.sh + ''; + +} From 0c0031dcff1df64ce02a18d88d14879f8f747809 Mon Sep 17 00:00:00 2001 From: Connor Luckett Date: Thu, 27 Mar 2025 16:19:53 -0700 Subject: [PATCH 2/4] Add ports debugging command --- shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/shell.nix b/shell.nix index daa41152..404aaa83 100644 --- a/shell.nix +++ b/shell.nix @@ -19,6 +19,7 @@ pkgs.mkShell { 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 = '' From 1075502d32accd53eee470ca1f07bbdd3da5a36f Mon Sep 17 00:00:00 2001 From: Connor Luckett Date: Fri, 11 Apr 2025 15:57:51 -0700 Subject: [PATCH 3/4] Add Protobuf & protoc --- shell.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index 404aaa83..ff93ff1a 100644 --- a/shell.nix +++ b/shell.nix @@ -3,10 +3,14 @@ pkgs.mkShell { packages = with pkgs; [ + jdk8 hbase_2_4 - jdk8 hadoop + go_1_24 + protoc-gen-go + protobuf + procps ]; From 2c13d4fefb651af10189373edac6d8a1f5864223 Mon Sep 17 00:00:00 2001 From: Connor Luckett Date: Mon, 14 Jul 2025 14:34:19 -0700 Subject: [PATCH 4/4] root: Set go version to 1.23 --- shell.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index ff93ff1a..21796f79 100644 --- a/shell.nix +++ b/shell.nix @@ -7,7 +7,7 @@ pkgs.mkShell { hbase_2_4 hadoop - go_1_24 + go_1_23 protoc-gen-go protobuf