From 87f0ffd694a8e035e30d60d01f9db6668661803f Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 8 Dec 2023 13:18:53 +0530 Subject: [PATCH] add devShell for go --- README.md | 11 +++++++++++ flake.nix | 3 +++ go.nix | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 README.md create mode 100644 go.nix diff --git a/README.md b/README.md new file mode 100644 index 0000000..4021027 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Dev Shells with Nix + +This repo contains a bunch of handy dev shells that can used on any system that has the nix package manager installed. + +## Available shells + +### Go + - makes `go` and `gopls` available + - can be activated with `nix develop github:adtya/devshells#go` + - can also be activated with direnv by adding `use flake github:adtya/devshells#go` to `.envrc` + diff --git a/flake.nix b/flake.nix index 5cc152e..09aba1f 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,9 @@ }; in { + devShells = { + go = import ./go.nix { inherit pkgs; }; + }; } ); } diff --git a/go.nix b/go.nix new file mode 100644 index 0000000..d5c8566 --- /dev/null +++ b/go.nix @@ -0,0 +1,3 @@ +{ pkgs }: pkgs.mkShell { + packages = with pkgs; [ go gopls ]; +}