ref(nix): move shell to shell.nix

This commit is contained in:
b4mbus
2024-06-09 02:42:08 +02:00
parent 4d5e2212e3
commit 5f85054405
2 changed files with 25 additions and 18 deletions

24
shell.nix Normal file
View File

@@ -0,0 +1,24 @@
{
self',
packageToml,
rust-bin,
mkShell,
}: let
msrv = packageToml.rust-version;
mkDevShell = rust:
mkShell {
inputsFrom = [
(self'.packages.default.override {
rust = rust.override {
extensions = ["rust-src"];
};
})
];
env.RUST_BACKTRACE = 1;
};
in {
default = mkDevShell rust-bin.stable.latest.default;
msrv = mkDevShell rust-bin.stable.${msrv}.default;
}