forked from conduit666/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
40 lines (37 loc) · 1.21 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
{
description = "zkSync development shell";
inputs = {
stable.url = "github:NixOS/nixpkgs/nixos-22.11";
};
outputs = {self, stable}: {
packages.x86_64-linux.default =
with import stable { system = "x86_64-linux"; };
pkgs.mkShell {
name = "zkSync";
src = ./.;
buildInputs = [
docker-compose
nodejs
yarn
axel
libclang
openssl
pkg-config
postgresql
python3
solc
];
# for RocksDB and other Rust bindgen libraries
LIBCLANG_PATH = lib.makeLibraryPath [ libclang.lib ];
BINDGEN_EXTRA_CLANG_ARGS = ''-I"${libclang.lib}/lib/clang/${libclang.version}/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";
};
};
}