feat(nix): flake-parts, first draft

This commit is contained in:
aviac
2025-10-27 12:55:20 +00:00
committed by Jade Ellis
parent cb7875e479
commit 68bea1816f
18 changed files with 757 additions and 1040 deletions
+31
View File
@@ -0,0 +1,31 @@
{ inputs, ... }:
{
perSystem =
{
system,
...
}:
{
packages =
let
fnx = inputs.fenix.packages.${system};
stable = fnx.fromToolchainFile {
file = inputs.self + "/rust-toolchain.toml";
# See also `rust-toolchain.toml`
sha256 = "sha256-+9FmLhAOezBZCOziO0Qct1NOrfpjNsXxc/8I0c7BdKE=";
};
in
{
# used for building nix stuff (doesn't include rustfmt overhead)
build-toolchain = stable;
# used for dev shells
dev-toolchain = fnx.combine [
stable
# use the nightly rustfmt because we use nightly features
fnx.complete.rustfmt
];
};
};
}