Compare commits

...

3 Commits

Author SHA1 Message Date
Christine Dodrill
c03eaba1a6 comment out the shell.nix file
Signed-off-by: Christine Dodrill <xe@tailscale.com>
2020-12-21 10:19:03 -05:00
Christine Dodrill
abaedc675b Review cleanups 2020-12-16 09:48:01 -05:00
Christine Dodrill
70512da940 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 <me@christine.website>
2020-12-15 09:11:04 -05:00
2 changed files with 28 additions and 0 deletions

4
.gitignore vendored
View File

@@ -19,3 +19,7 @@ cmd/tailscaled/tailscaled
# Dependency directories (remove the comment below to include it)
# vendor/
# direnv config, this may be different for other people so it's probably safer
# to make this nonspecific.
.envrc

24
shell.nix Normal file
View File

@@ -0,0 +1,24 @@
# This is a shell.nix file used to describe the environment that tailscale needs
# for development. This includes a lot of the basic tools that you need in order
# to get started. We hope this file will be useful for users of Nix on macOS or
# Linux.
#
# For more information about this and why this file is useful, see here:
# https://nixos.org/guides/nix-pills/developing-with-nix-shell.html
#
# Also look into direnv: https://direnv.net/, this can make it so that you can
# automatically get your environment set up when you change folders into the
# project.
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
# This specifies the tools that are needed for people to get started with
# development. These tools include:
# - The Go compiler toolchain (and all additional tooling with it)
# - goimports, a robust formatting tool for Go source code
# - gopls, the language server for Go to increase editor integration
# - git, the version control program (used in some scripts)
buildInputs = with pkgs; [
go goimports gopls git
];
}