diff --git a/flake.lock b/flake.lock index 11be3bc9a7..9027ab2d8c 100644 --- a/flake.lock +++ b/flake.lock @@ -102,7 +102,9 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": [ + "systems" + ] }, "locked": { "lastModified": 1731533236, @@ -667,7 +669,8 @@ "nixpkgs": [ "haskellNix", "nixpkgs-2405" - ] + ], + "systems": "systems" } }, "stackage": { @@ -687,18 +690,16 @@ } }, "systems": { + "flake": false, "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" + "lastModified": 1, + "narHash": "sha256-b1F680f3MXFMDcYdNiqqnK/H/M4Mr1jzndTzkJbImr4=", + "path": "/nix/store/qmdq2iq0v94fkw0a3wqrhcb0vgc15y8l-source/nix/systems.nix", + "type": "path" }, "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "path": "/nix/store/qmdq2iq0v94fkw0a3wqrhcb0vgc15y8l-source/nix/systems.nix", + "type": "path" } } }, diff --git a/flake.nix b/flake.nix index 494fabf317..afaf7f9848 100644 --- a/flake.nix +++ b/flake.nix @@ -7,22 +7,26 @@ }; inputs = { + flake-utils = { + inputs.systems.follows = "systems"; + url = "github:numtide/flake-utils"; + }; haskellNix.url = "github:input-output-hk/haskell.nix"; nixpkgs.follows = "haskellNix/nixpkgs-2405"; - flake-utils.url = "github:numtide/flake-utils"; + systems = { + flake = false; + url = "./nix/systems.nix"; + }; }; outputs = { - self, + flake-utils, haskellNix, nixpkgs, - flake-utils, + self, + systems, }: - flake-utils.lib.eachSystem [ - "x86_64-linux" - "x86_64-darwin" - "aarch64-darwin" - ] + flake-utils.lib.eachSystem (import systems) (system: let ## It’s much easier to read from a JSON file than to have JSON import from some other file, so we extract some ## configuration from the VS Code settings to avoid duplication. diff --git a/nix/systems.nix b/nix/systems.nix new file mode 100644 index 0000000000..71078aed37 --- /dev/null +++ b/nix/systems.nix @@ -0,0 +1,4 @@ +[ "aarch64-darwin" + "x86_64-darwin" + "x86_64-linux" +]