-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathshell.nix
More file actions
61 lines (55 loc) · 1.63 KB
/
shell.nix
File metadata and controls
61 lines (55 loc) · 1.63 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
{
stdenv,
pkgs,
lib,
}:
let
go_1_26_2 = pkgs.go_1_26.overrideAttrs (_old: rec {
version = "1.26.2";
src = pkgs.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-LpHrtpR6lulDb7KzkmqIAu/mOm03Xf/sT4Kqnb1v1Ds=";
};
});
in
pkgs.mkShell {
buildInputs = with pkgs;
[
# nix tooling
alejandra
# Go 1.26 + tools
go_1_26_2
gopls
delve
golangci-lint
gotools
go-mockery
# TS/Node set of tools for changesets
nodejs_24
(yarn.override {nodejs = nodejs_24;})
(pnpm.override {nodejs = nodejs_24;})
typescript
typescript-language-server
# Required dependency for @ledgerhq/hw-transport-node-hid -> usb
node-gyp
# Extra tools
git
jq
kubectl
kubernetes-helm
yq-go # for manipulating golangci-lint config
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
# Required to support go build inside a nix devshell (c compiler dependency on SecTrustCopyCertificateChain/macOS 12+)
# https://github.com/NixOS/nixpkgs/issues/433688#issuecomment-3231551949
pkgs.apple-sdk_15
];
shellHook = ''
unset GOROOT
unset GOTOOLDIR
export GOTOOLCHAIN=local
# use upstream golangci-lint config from core Chainlink repository, overriding the local prefixes
alias golint="golangci-lint run --config <(curl -sSL https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/.golangci.yml | yq e '.formatters.settings.goimports.local-prefixes = [\"github.com/smartcontractkit/chainlink-ton\"]' -) --path-mode \"abs\""
'';
}