diff options
author | Jonas Chevalier <zimbatm@zimbatm.com> | 2021-10-05 09:14:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 11:14:47 +0200 |
commit | 8377a7bca967dba811899164d4218d1d4a24b483 (patch) | |
tree | 931a54c56c39aba65131393d8c1561fd5ffe1f69 | |
parent | a2a0a58f7c6c3d6f1174524333c078052916841f (diff) | |
download | nixpkgs-8377a7bca967dba811899164d4218d1d4a24b483.tar nixpkgs-8377a7bca967dba811899164d4218d1d4a24b483.tar.gz nixpkgs-8377a7bca967dba811899164d4218d1d4a24b483.tar.bz2 nixpkgs-8377a7bca967dba811899164d4218d1d4a24b483.tar.lz nixpkgs-8377a7bca967dba811899164d4218d1d4a24b483.tar.xz nixpkgs-8377a7bca967dba811899164d4218d1d4a24b483.tar.zst nixpkgs-8377a7bca967dba811899164d4218d1d4a24b483.zip |
lib: add list of supported systems (#140428)
Adds the first 3 tiers of RFC0046 that are being used in flake.nix.
-rw-r--r-- | flake.nix | 10 | ||||
-rw-r--r-- | lib/systems/default.nix | 1 | ||||
-rw-r--r-- | lib/systems/supported.nix | 24 |
3 files changed, 26 insertions, 9 deletions
diff --git a/flake.nix b/flake.nix index ececd26c153..1e20fcd40eb 100644 --- a/flake.nix +++ b/flake.nix @@ -11,15 +11,7 @@ lib = import ./lib; - systems = [ - "x86_64-linux" - "i686-linux" - "x86_64-darwin" - "aarch64-linux" - "armv6l-linux" - "armv7l-linux" - "aarch64-darwin" - ]; + systems = lib.systems.supported.hydra; forAllSystems = f: lib.genAttrs systems (system: f system); diff --git a/lib/systems/default.nix b/lib/systems/default.nix index ef609859abb..529eeb6514b 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -8,6 +8,7 @@ rec { platforms = import ./platforms.nix { inherit lib; }; examples = import ./examples.nix { inherit lib; }; architectures = import ./architectures.nix { inherit lib; }; + supported = import ./supported.nix { inherit lib; }; # Elaborate a `localSystem` or `crossSystem` so that it contains everything # necessary. diff --git a/lib/systems/supported.nix b/lib/systems/supported.nix new file mode 100644 index 00000000000..60bf3074134 --- /dev/null +++ b/lib/systems/supported.nix @@ -0,0 +1,24 @@ +# Supported systems according to RFC0046's definition. +# +# https://github.com/NixOS/rfcs/blob/master/rfcs/0046-platform-support-tiers.md +{ lib }: +rec { + # List of systems that are built by Hydra. + hydra = tier1 ++ tier2 ++ tier3; + + tier1 = [ + "x86_64-linux" + ]; + + tier2 = [ + "aarch64-linux" + "x86_64-darwin" + ]; + + tier3 = [ + "armv6l-linux" + "armv7l-linux" + "i686-linux" + "mipsel-linux" + ]; +} |