forked from smartcontractkit/chainlink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
60 lines (53 loc) · 1.29 KB
/
shell.nix
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
{pkgs}:
with pkgs; let
go = go_1_21;
postgresql = postgresql_14;
nodejs = nodejs-18_x;
nodePackages = pkgs.nodePackages.override {inherit nodejs;};
pnpm = pnpm_9;
mkShell' = mkShell.override {
# The current nix default sdk for macOS fails to compile go projects, so we use a newer one for now.
stdenv =
if stdenv.isDarwin
then overrideSDK stdenv "11.0"
else stdenv;
};
in
mkShell' {
nativeBuildInputs =
[
go
goreleaser
postgresql
python3
python3Packages.pip
protobuf
protoc-gen-go
protoc-gen-go-grpc
foundry-bin
curl
nodejs
pnpm
# TODO: compiler / gcc for secp compilation
go-ethereum # geth
go-mockery
# tooling
gotools
gopls
delve
golangci-lint
github-cli
jq
# gofuzz
]
++ lib.optionals stdenv.isLinux [
# some dependencies needed for node-gyp on pnpm install
pkg-config
libudev-zero
libusb1
];
LD_LIBRARY_PATH = "${stdenv.cc.cc.lib}/lib64:$LD_LIBRARY_PATH";
GOROOT = "${go}/share/go";
PGDATA = "db";
CL_DATABASE_URL = "postgresql://chainlink:chainlink@localhost:5432/chainlink_test?sslmode=disable";
}