rshell/nix/rust-overlay/flake-module.nix
2024-10-08 20:44:10 +02:00

20 lines
567 B
Nix

{ inputs, ... }:
let
overlays = [
(import inputs.rust-overlay)
(self: super: assert !(super ? rust-toolchain); rec {
rust-toolchain =
super.rust-bin.fromRustupToolchainFile ../../rust-toolchain.toml;
# super.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default);
# buildRustCrate/crate2nix depend on this.
# rustc = rust-toolchain;
# cargo = rust-toolchain;
})
];
in
{
perSystem = { system, ... }: {
_module.args.pkgs = import inputs.nixpkgs { inherit system overlays; config = { }; };
};
}