Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
chore(nix): update flake to support new rust toolchain (matter-labs#2211
Browse files Browse the repository at this point in the history
)

## What ❔

update the nix flake

## Why ❔

to reproducibly build the zksync-era server and to develop easily with
the help of nix

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] 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
haraldh authored Jun 12, 2024
1 parent eca98cc commit 1cb0887
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{
description = "zkSync-era";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};
Expand All @@ -46,7 +46,7 @@
# patched version of cargo to support `cargo vendor` for vendoring dependencies
# see https://github.com/matter-labs/zksync-era/issues/1086
# used as `cargo vendor --no-merge-sources`
cargo-vendor = pkgs.rustPlatform.buildRustPackage rec {
cargo-vendor = pkgs.rustPlatform.buildRustPackage {
pname = "cargo-vendor";
version = "0.78.0";
src = pkgs.fetchFromGitHub {
Expand All @@ -68,7 +68,7 @@

# custom import-cargo-lock to import Cargo.lock file and vendor dependencies
# see https://github.com/matter-labs/zksync-era/issues/1086
import-cargo-lock = { lib, cacert, runCommand }: { src, cargoHash ? null } @ args:
import-cargo-lock = { lib, cacert, runCommand }: { src, cargoHash ? null }:
runCommand "import-cargo-lock"
{
inherit src;
Expand Down Expand Up @@ -96,12 +96,12 @@

stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.clangStdenv;

rustPlatform = (pkgs.makeRustPlatform {
rustPlatform = pkgs.makeRustPlatform {
cargo = rustVersion;
rustc = rustVersion;
inherit stdenv;
});
zksync_server_cargoToml = (builtins.fromTOML (builtins.readFile ./core/bin/zksync_server/Cargo.toml));
};
zksync_server_cargoToml = builtins.fromTOML (builtins.readFile ./core/bin/zksync_server/Cargo.toml);

hardeningEnable = [ "fortify3" "pie" "relro" ];

Expand Down

0 comments on commit 1cb0887

Please sign in to comment.