flake: add devShells
exposed via nix registry :D can be used in nix-direnv like `use flake shells#cs.osu`
This commit is contained in:
parent
8c75ba2a2d
commit
76b6f7cfb8
11 changed files with 283 additions and 0 deletions
25
shells/rust/default.nix
Normal file
25
shells/rust/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
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}";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue