Last active
March 10, 2024 21:31
-
-
Save savannidgerinel/a58c9d014cdc91af2cd367e7707d0d17 to your computer and use it in GitHub Desktop.
Nix setup for a Golang dev environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[go-shell] savanni@lapis:~/src/golang $ ls -l | |
total 81928 | |
drwxr-xr-x 5 savanni staff 160 Dec 17 2018 bin | |
drwxr-xr-x 4 savanni staff 128 Jun 11 2018 pkg | |
-rw-r--r-- 1 savanni staff 923 Jun 11 2018 shell.nix | |
drwxr-xr-x 9 savanni staff 288 Jun 10 2018 src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} | |
, golang ? pkgs.go | |
, godep ? pkgs.dep }: | |
pkgs.stdenv.mkDerivation { | |
name = "go-shell"; | |
buildInputs = [ golang | |
godep | |
]; | |
shellHook = '' | |
export GOPATH=`pwd` | |
export PATH=$GOPATH/bin:$PATH | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment