flakes/shells/rust/default.nix
LavaDesu 76b6f7cfb8
flake: add devShells
exposed via nix registry :D
can be used in nix-direnv like `use flake shells#cs.osu`
2021-11-17 11:14:10 +07:00

25 lines
461 B
Nix

{
inputs,
mkShell,
pkg-config
}:
let
overlays = [ (import inputs.rust-overlay) ];
pkgs = import inputs.nixpkgs {
inherit system overlays;
};
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain;
rustPlatform = pkgs.makeRustPlatform {
inherit (toolchain) cargo rustc;
};
in mkShell {
nativeBuildInputs = [
toolchain
pkg-config
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
}