57 lines
1.6 KiB
Nix
57 lines
1.6 KiB
Nix
{
|
|
description = "Storage engine playground: Rust workspace for FlowLog, DBSP, CRDT, and Geomerge experiments.";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ rust-overlay.overlays.default ];
|
|
};
|
|
|
|
# Edition 2024 requires Rust >= 1.85. Pin to a recent stable.
|
|
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
|
|
extensions = [ "rust-src" "rust-analyzer" "clippy" "rustfmt" ];
|
|
};
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
name = "storage-engine-playground";
|
|
|
|
packages = [
|
|
rustToolchain
|
|
# Diagram regeneration in crates/geomerge-demo/docs/diagrams.
|
|
pkgs.graphviz
|
|
# Cargo helpers.
|
|
pkgs.cargo-watch
|
|
pkgs.cargo-nextest
|
|
# Pre-commit hooks (see .pre-commit-config.yaml, Makefile setup-hooks).
|
|
pkgs.pre-commit
|
|
pkgs.python3
|
|
];
|
|
|
|
env = {
|
|
RUST_BACKTRACE = "1";
|
|
};
|
|
|
|
shellHook = ''
|
|
echo "storage-engine-playground dev shell"
|
|
echo " rustc: $(rustc --version)"
|
|
echo " cargo: $(cargo --version)"
|
|
echo " dot: $(dot -V 2>&1)"
|
|
'';
|
|
};
|
|
|
|
formatter = pkgs.nixpkgs-fmt;
|
|
});
|
|
}
|