forked from mirrors/nixpkgs
lib: add list of supported systems (#140428)
Adds the first 3 tiers of RFC0046 that are being used in flake.nix.
This commit is contained in:
parent
a2a0a58f7c
commit
8377a7bca9
10
flake.nix
10
flake.nix
|
@ -11,15 +11,7 @@
|
||||||
|
|
||||||
lib = import ./lib;
|
lib = import ./lib;
|
||||||
|
|
||||||
systems = [
|
systems = lib.systems.supported.hydra;
|
||||||
"x86_64-linux"
|
|
||||||
"i686-linux"
|
|
||||||
"x86_64-darwin"
|
|
||||||
"aarch64-linux"
|
|
||||||
"armv6l-linux"
|
|
||||||
"armv7l-linux"
|
|
||||||
"aarch64-darwin"
|
|
||||||
];
|
|
||||||
|
|
||||||
forAllSystems = f: lib.genAttrs systems (system: f system);
|
forAllSystems = f: lib.genAttrs systems (system: f system);
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ rec {
|
||||||
platforms = import ./platforms.nix { inherit lib; };
|
platforms = import ./platforms.nix { inherit lib; };
|
||||||
examples = import ./examples.nix { inherit lib; };
|
examples = import ./examples.nix { inherit lib; };
|
||||||
architectures = import ./architectures.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
|
# Elaborate a `localSystem` or `crossSystem` so that it contains everything
|
||||||
# necessary.
|
# necessary.
|
||||||
|
|
24
lib/systems/supported.nix
Normal file
24
lib/systems/supported.nix
Normal file
|
@ -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"
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in a new issue