From 86d86628cba89238b095ec7bd6d7169a7e980f57 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Thu, 4 Sep 2025 04:01:10 -0400 Subject: [PATCH] build(nix): use fenix for rust toolchain This plays more nicely with cross for local testing --- flake.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/flake.nix b/flake.nix index 0808ae21..a030f9a6 100644 --- a/flake.nix +++ b/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 =