lib: add list of supported systems (#140428)
Adds the first 3 tiers of RFC0046 that are being used in flake.nix.
commit8377a7bca967dba811899164d4218d1d4a24b483
authorJonas Chevalier <zimbatm@zimbatm.com>
dateTue 5 Oct 2021, 09:14 (5 years ago)
parenta2a0a58
flake.nix+1−9
@@ -11,15 +11,7 @@
1111
1212 lib = import ./lib;
1313
14− systems = [
15− "x86_64-linux"
16− "i686-linux"
17− "x86_64-darwin"
18− "aarch64-linux"
19− "armv6l-linux"
20− "armv7l-linux"
21− "aarch64-darwin"
22− ];
14+ systems = lib.systems.supported.hydra;
2315
2416 forAllSystems = f: lib.genAttrs systems (system: f system);
2517
lib/systems/default.nix+1
@@ -8,6 +8,7 @@ rec {
88 platforms = import ./platforms.nix { inherit lib; };
99 examples = import ./examples.nix { inherit lib; };
1010 architectures = import ./architectures.nix { inherit lib; };
11+ supported = import ./supported.nix { inherit lib; };
1112
1213 # Elaborate a `localSystem` or `crossSystem` so that it contains everything
1314 # necessary.
lib/systems/supported.nixnew file+24
@@ -0,0 +1,24 @@
1+# Supported systems according to RFC0046's definition.
2+#
3+# https://github.com/NixOS/rfcs/blob/master/rfcs/0046-platform-support-tiers.md
4+{ lib }:
5+rec {
6+ # List of systems that are built by Hydra.
7+ hydra = tier1 ++ tier2 ++ tier3;
8+
9+ tier1 = [
10+ "x86_64-linux"
11+ ];
12+
13+ tier2 = [
14+ "aarch64-linux"
15+ "x86_64-darwin"
16+ ];
17+
18+ tier3 = [
19+ "armv6l-linux"
20+ "armv7l-linux"
21+ "i686-linux"
22+ "mipsel-linux"
23+ ];
24+}