diff options
Diffstat (limited to 'parts/toolchain.nix')
| -rw-r--r-- | parts/toolchain.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/parts/toolchain.nix b/parts/toolchain.nix new file mode 100644 index 0000000..e2201f9 --- /dev/null +++ b/parts/toolchain.nix @@ -0,0 +1,24 @@ +{inputs, ...}: { + perSystem = {system, ...}: let + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [inputs.fenix.overlays.default]; + }; + + toolchain = with pkgs.fenix; + with stable; + combine [ + cargo + rustc + rustfmt + clippy + targets."x86_64-unknown-linux-musl".stable.rust-std + ]; + in { + _module.args = { + inherit pkgs toolchain; + + craneLib = (inputs.crane.mkLib pkgs).overrideToolchain toolchain; + }; + }; +} |
