matrix-user-swap/nix/crane.nix
Olivia Lee e42336663f
bump nix dependencies, upgrading rustc to 1.90.0 and rust edition 2024
I want the if-let-chains :)

This triggered some rustfmt changes, and a couple 'if let' blocks that
can now be collapsed.
2025-10-03 17:39:25 -07:00

25 lines
565 B
Nix

{
sources,
pkgs,
useNightlyRustfmt ? false,
}:
let
crane = import sources.crane { inherit pkgs; };
in
crane.overrideToolchain (
p:
let
fenix = import sources.fenix { pkgs = p; };
stable = fenix.fromToolchainName {
name = (pkgs.lib.importTOML ../rust-toolchain.toml).toolchain.channel;
sha256 = "sha256-SJwZ8g0zF2WrKDVmHrVG3pD2RGoQeo24MEXnNx5FyuI=";
};
nightly = fenix.latest;
in
fenix.combine [
stable.rustc
stable.cargo
stable.clippy
(if useNightlyRustfmt then nightly.rustfmt else stable.rustfmt)
]
)