forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
43 lines (40 loc) · 1.29 KB
/
flake.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
{
description = "zkSync development shell";
inputs = {
stable.url = "github:NixOS/nixpkgs/nixos-23.11";
};
outputs = { self, stable }: {
formatter.x86_64-linux = stable.legacyPackages.x86_64-linux.nixpkgs-fmt;
devShells.x86_64-linux.default =
with import stable { system = "x86_64-linux"; };
pkgs.mkShell.override { stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.gccStdenv; } {
name = "zkSync";
src = ./.;
buildInputs = [
docker-compose
nodejs
yarn
axel
libclang
openssl
pkg-config
postgresql
python3
solc
sqlx-cli
rustup
];
# for RocksDB and other Rust bindgen libraries
LIBCLANG_PATH = lib.makeLibraryPath [ libclang.lib ];
BINDGEN_EXTRA_CLANG_ARGS = ''-I"${libclang.lib}/lib/clang/${builtins.elemAt (builtins.splitVersion libclang.version) 0}/include"'';
shellHook = ''
export ZKSYNC_HOME=$PWD
export PATH=$ZKSYNC_HOME/bin:$PATH
'';
# hardhat solc requires ld-linux
# Nixos has to fake it with nix-ld
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [];
NIX_LD = builtins.readFile "${stdenv.cc}/nix-support/dynamic-linker";
};
};
}