Files
continuwuity/nix/rust.nix
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
799 B
Nix
Raw Normal View History

2025-09-24 14:33:20 +02:00
{ inputs, ... }:
{
perSystem =
{
2025-10-21 19:17:55 +02:00
lib,
inputs',
2026-03-30 22:16:43 -04:00
pkgs,
2025-09-24 14:33:20 +02:00
...
}:
let
mkToolchain =
target:
target.fromToolchainName {
name = (lib.importTOML "${inputs.self}/rust-toolchain.toml").toolchain.channel;
sha256 = "sha256-mvUGEOHYJpn3ikC5hckneuGixaC+yGrkMM/liDIDgoU=";
};
in
2025-09-24 14:33:20 +02:00
{
_module.args = { inherit mkToolchain; };
2025-09-24 14:33:20 +02:00
packages =
let
fnx = inputs'.fenix.packages;
stable-toolchain = (mkToolchain fnx).toolchain;
2025-09-24 14:33:20 +02:00
in
{
2026-03-30 22:16:43 -04:00
inherit stable-toolchain;
2025-09-24 14:33:20 +02:00
dev-toolchain = fnx.combine [
2026-03-30 22:16:43 -04:00
stable-toolchain
2025-09-24 14:33:20 +02:00
# use the nightly rustfmt because we use nightly features
fnx.complete.rustfmt
];
};
};
}