Skip to content

Commit

Permalink
✨ Isolating tmpdir and gopath in nix-shell
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammed Hussein Karimi <[email protected]>
  • Loading branch information
mhkarimi1383 committed Dec 12, 2024
1 parent b949d82 commit 3590004
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nix/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.go/
.tmp/
8 changes: 7 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ pkgs.mkShell {
go_1_19
golint
kubectl
kubernetes-controller-tools
kubernetes-helm
gnumake
minikube
semver-tool
yq-go
];
shellHook = ''
export GOPATH=$(pwd)/nix/.go
export TMPDIR=$(pwd)/nix/.tmp
export PATH=$GOPATH/bin:$PATH
go install sigs.k8s.io/controller-tools/cmd/[email protected]
mkdir -p "$TMPDIR"
'';
}

0 comments on commit 3590004

Please sign in to comment.