From 70512da940616d913e6f1eb19dc1372a791eef0b Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Tue, 15 Dec 2020 09:10:56 -0500 Subject: [PATCH] add nix-shell boilerplate This enables users of nix-shell and lorri to automagically have the correct development environment by simply changing directory into a checkout of this repo. For more information on this see the following links: - https://christine.website/blog/how-i-start-nix-2020-03-08 - https://direnv.net/ - https://www.tweag.io/blog/2019-03-28-introducing-lorri/ Signed-off-by: Christine Dodrill --- .envrc | 1 + shell.nix | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..051d09d29 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv)" diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..c9c5029a8 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + buildInputs = with pkgs; [ + go goimports gopls + + # keep this line if you use bash + pkgs.bashInteractive + ]; +}