chore: add nix-shell configure for a minimal environment for development (#5175)

* chore: add nix-shell development environment

* chore: add rust-analyzer

* chore: use .envrc as a private file
This commit is contained in:
Ning Sun
2024-12-16 19:47:18 +08:00
committed by GitHub
parent 88f7075a2a
commit acedff030b
2 changed files with 27 additions and 1 deletions

6
.gitignore vendored
View File

@@ -47,6 +47,10 @@ benchmarks/data
venv/
# Fuzz tests
# Fuzz tests
tests-fuzz/artifacts/
tests-fuzz/corpus/
# Nix
.direnv
.envrc

22
shell.nix Normal file
View File

@@ -0,0 +1,22 @@
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
fenix = import (fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz") {};
pkgs = import nixpkgs { config = {}; overlays = []; };
in
pkgs.mkShellNoCC {
packages = with pkgs; [
git
clang
gcc
mold
libgit2
protobuf
(fenix.fromToolchainFile {
dir = ./.;
})
fenix.rust-analyzer
cargo-nextest
];
}