add devShell for go

This commit is contained in:
Adithya 2023-12-08 13:18:53 +05:30
parent 57f2578f74
commit 87f0ffd694
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
3 changed files with 17 additions and 0 deletions

11
README.md Normal file
View file

@ -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`

View file

@ -13,6 +13,9 @@
}; };
in in
{ {
devShells = {
go = import ./go.nix { inherit pkgs; };
};
} }
); );
} }

3
go.nix Normal file
View file

@ -0,0 +1,3 @@
{ pkgs }: pkgs.mkShell {
packages = with pkgs; [ go gopls ];
}