build: provide Nix env and envrc for MSRV

This commit is contained in:
Leonora Tindall 2024-03-31 21:43:25 -05:00
parent 60aa918513
commit ff4c4a72b6
3 changed files with 16 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use nix

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/target /target
Cargo.lock Cargo.lock
.direnv

14
shell.nix Normal file
View File

@ -0,0 +1,14 @@
let
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
rustVersion = "1.56.1";
rust = pkgs.rust-bin.stable.${rustVersion}.default;
in
pkgs.mkShell {
buildInputs = [
rust
] ++ (with pkgs; [
pkg-config
]);
RUST_BACKTRACE = 1;
}