diff --git a/flake.lock b/flake.lock index a9ea844..b2b1a07 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1779560665, @@ -18,6 +36,7 @@ }, "root": { "inputs": { + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" } @@ -41,6 +60,21 @@ "repo": "rust-overlay", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 7fee379..a517f11 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; }; @@ -9,28 +10,10 @@ { self, nixpkgs, + flake-utils, rust-overlay, }: - let - # Same default set and merge semantics as flake-utils.lib.eachDefaultSystem, - # without the extra flake input (its GitHub tarball fetch has been flaky in CI). - defaultSystems = [ - "aarch64-darwin" - "aarch64-linux" - "x86_64-darwin" - "x86_64-linux" - ]; - eachDefaultSystem = - f: - let - perSystem = nixpkgs.lib.genAttrs defaultSystems f; - in - { - devShells = nixpkgs.lib.mapAttrs (_: attrs: attrs.devShells) perSystem; - formatter = nixpkgs.lib.mapAttrs (_: attrs: attrs.formatter) perSystem; - }; - in - eachDefaultSystem ( + flake-utils.lib.eachDefaultSystem ( system: let pkgs = import nixpkgs {