build(nix): use fenix for rust toolchain
This plays more nicely with cross for local testing
This commit is contained in:
parent
17854168d9
commit
86d86628cb
1 changed files with 14 additions and 0 deletions
14
flake.nix
14
flake.nix
|
|
@ -4,6 +4,10 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
@ -28,11 +32,21 @@
|
|||
self',
|
||||
pkgs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
version = "0.26.0";
|
||||
|
||||
fenix = inputs.fenix.packages.${system};
|
||||
rustToolchain = fenix.complete.withComponents [
|
||||
"cargo"
|
||||
"clippy"
|
||||
"rust-src"
|
||||
"rustc"
|
||||
"rustfmt"
|
||||
];
|
||||
|
||||
src = pkgs.lib.cleanSourceWith {
|
||||
src = ./.;
|
||||
filter =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue