forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update flake.nix for the current release (matter-labs#914)
## What ❔ - update flake.nix for the current release - also modifiy the standard environment to use the `mold` linker - add `rustup` and `sqlx-cli` - reformat with `nixpkgs-fmt` - add formatter to flake for `nix fmt` - change flake output `packages` to `devShells`, because that is what this is - tested the flake ## Why ❔ The old version was outdated and the environment with `nix develop --impure` didn't work anymore. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `zk spellcheck`. Signed-off-by: Harald Hoyer <[email protected]>
- Loading branch information
Showing
2 changed files
with
42 additions
and
39 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,43 @@ | ||
{ | ||
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 | ||
]; | ||
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/${libclang.version}/include"''; | ||
# 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 | ||
''; | ||
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"; | ||
}; | ||
}; | ||
# 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"; | ||
}; | ||
}; | ||
} |