Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
Latest commit
75 lines (68 loc) · 1.75 KB
/
Copy pathshell.nix
File metadata and controls
75 lines (68 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{pkgs,scriptDir}:
withpkgs;
let
go=pkgs.go_1_21;
postgresql=postgresql_15;
nodejs=nodejs-18_x;
nodePackages=pkgs.nodePackages.override{inheritnodejs;};
mkShell'=mkShell.override{
# The current nix default sdk for macOS fails to compile go projects, so we use a newer one for now.
stdenv=ifstdenv.isDarwinthenoverrideSDKstdenv"11.0"elsestdenv;
};
in
mkShell'{
nativeBuildInputs=[
git
go
goreleaser
postgresql
python3
python3Packages.pip
curl
nodejs
nodePackages.pnpm
nodePackages.yarn
pre-commit
go-ethereum# geth
go-mockery
# tooling
gotools
gopls
delve
github-cli
jq
dasel
typos
# deployment
awscli2
devspace
kubectl
kubernetes-helm
k9s
]++lib.optionalsstdenv.isLinux[
# some dependencies needed for node-gyp on pnpm install
pkg-config
libudev-zero
libusb1
];
LD_LIBRARY_PATH=lib.makeLibraryPath[pkgs.zlibstdenv.cc.cc.lib];# lib64
GOROOT="${go}/share/go";
CGO_ENABLED="0";
HELM_REPOSITORY_CONFIG="${scriptDir}/.helm-repositories.yaml";
shellHook=''
# enable pre-commit hooks
pre-commit install > /dev/null
# enable pre-push hooks
pre-commit install -f --hook-type pre-push > /dev/null
# Update helm repositories
helm repo update > /dev/null
# setup go bin for nix
export GOBIN=$HOME/.nix-go/bin
mkdir -p $GOBIN
export PATH=$GOBIN:$PATH
# install gotestloghelper
go install github.com/goplugin/plugin-testing-framework/tools/gotestloghelper@latest
# workaround to install newer golangci-lint, so that we don't have to update all dependencies
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2
'';
}