forked from celo-org/op-succinct
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
59 lines (52 loc) · 1.63 KB
/
flake.nix
File metadata and controls
59 lines (52 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
{
description = "celo-kona dev env (Rust 1.88 + test tooling)";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
foundry.url = "github:shazow/foundry.nix/stable";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay, foundry, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) foundry.overlay ];
pkgs = import nixpkgs { inherit system overlays; };
# Rust 1.88 toolchain to match rust-toolchain.toml / workspace metadata
rustToolchain = pkgs.rust-bin.stable."1.88.0".minimal.override {
extensions = [
"clippy"
"rustfmt"
"llvm-tools-preview"
"rust-src"
];
};
in
with pkgs; {
devShell = mkShell {
buildInputs = [
rustToolchain
# Test & workspace tools (see Justfile)
cargo-nextest
cargo-hack
just
# Common system libraries / tooling
pkg-config
openssl
rocksdb
curl
git
llvmPackages.libclang
clang
foundry-bin
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
LIBCLANG_PATH = "${lib.getLib llvmPackages.libclang}/lib";
shellHook = ''
export RUST_BACKTRACE=full
export PATH="$PATH:$(pwd)/target/debug:$(pwd)/target/release"
'';
};
}
);
}