From 491e13f522ce955d6b4845f530482b80a64847da Mon Sep 17 00:00:00 2001 From: Huang-Huang Bao Date: Sat, 25 Jan 2025 21:24:35 +0800 Subject: [PATCH] chore(nix): read MSRV from Cargo.toml --- flake.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 5491f80..4dc007d 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,14 @@ einat = defaultPackage' prev; }; + cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml); + + verifyMsrvArgs = { + rustVersion = nixpkgs.lib.versions.pad 3 cargoToml."package"."rust-version"; + enableStatic = true; + enableIpv6 = true; + }; + module = { imports = [ (import ./nix/module.nix) @@ -60,12 +68,6 @@ } ); crossPackage = { ... }@args: crossPackage' ({ inherit pkgs; } // args); - - verifyMsrvArgs = { - rustVersion = "1.80.0"; - enableStatic = true; - enableIpv6 = true; - }; in { legacyPackages = (import nixpkgs) {