additional nix tooling

This commit is contained in:
raf 2024-08-05 03:48:51 +03:00
parent 1ced9b4527
commit 52d9a479cf
Signed by: NotAShelf
GPG key ID: AF26552424E53993
3 changed files with 34 additions and 0 deletions

5
.envrc Normal file
View file

@ -0,0 +1,5 @@
watch_file flake.nix
watch_file flake.lock
watch_dir nix
use flake

View file

@ -13,5 +13,9 @@
packages = forEachSystem (system: { packages = forEachSystem (system: {
default = pkgsForEach.${system}.callPackage ./nix/package.nix {}; default = pkgsForEach.${system}.callPackage ./nix/package.nix {};
}); });
devShells = forEachSystem (system: {
default = pkgsForEach.${system}.callPackage ./nix/shell.nix {};
});
}; };
} }

25
nix/shell.nix Normal file
View file

@ -0,0 +1,25 @@
{
mkShell,
rust-analyzer-unwrapped,
rustfmt,
clippy,
cargo,
rustc,
gcc,
rustPlatform,
}:
mkShell {
strictDeps = true;
nativeBuildInputs = [
cargo
rustc
gcc
rust-analyzer-unwrapped
rustfmt
clippy
];
env.RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
}