forked from continuwuation/continuwuity
36 lines
799 B
Nix
36 lines
799 B
Nix
{ inputs, ... }:
|
|
{
|
|
perSystem =
|
|
{
|
|
lib,
|
|
inputs',
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
mkToolchain =
|
|
target:
|
|
target.fromToolchainName {
|
|
name = (lib.importTOML "${inputs.self}/rust-toolchain.toml").toolchain.channel;
|
|
sha256 = "sha256-mvUGEOHYJpn3ikC5hckneuGixaC+yGrkMM/liDIDgoU=";
|
|
};
|
|
in
|
|
{
|
|
_module.args = { inherit mkToolchain; };
|
|
|
|
packages =
|
|
let
|
|
fnx = inputs'.fenix.packages;
|
|
stable-toolchain = (mkToolchain fnx).toolchain;
|
|
in
|
|
{
|
|
inherit stable-toolchain;
|
|
|
|
dev-toolchain = fnx.combine [
|
|
stable-toolchain
|
|
# use the nightly rustfmt because we use nightly features
|
|
fnx.complete.rustfmt
|
|
];
|
|
};
|
|
};
|
|
}
|