Skip to content

Commit

Permalink
lib: add list of supported systems (#140428)
Browse files Browse the repository at this point in the history
Adds the first 3 tiers of RFC0046 that are being used in flake.nix.
  • Loading branch information
zimbatm authored Oct 5, 2021
1 parent a2a0a58 commit 8377a7b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
10 changes: 1 addition & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions lib/systems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
24 changes: 24 additions & 0 deletions lib/systems/supported.nix
Original file line number Diff line number Diff line change
@@ -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"
];
}

0 comments on commit 8377a7b

Please sign in to comment.