diff options
author | sternenseemann <sternenseemann@systemli.org> | 2022-04-11 22:11:29 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2022-05-23 15:27:30 +0200 |
commit | 168b926435628cb06c4a8cb0f3e6f69f141529f1 (patch) | |
tree | aadc17fe211331852eef5a9658533c91071e8c0f /lib/systems | |
parent | 6d82088583295dea8f9d7f61641dc3d8c5014fc7 (diff) |
lib.systems: remove supported, replace with flakeExposed
Since the list only gates the platforms the nixpkgs flake exposes packages to build on, the `hydra` label made little sense. It was also only used for this purpose, so the `tier*` attributes were largely unnecessary. To reflect the intention more accurately, we expose `lib.systems.flakeExposed` and use it to gate flake.nix's system list.
Diffstat (limited to 'lib/systems')
-rw-r--r-- | lib/systems/default.nix | 11 | ||||
-rw-r--r-- | lib/systems/flake-systems.nix | 29 | ||||
-rw-r--r-- | lib/systems/supported.nix | 26 |
3 files changed, 39 insertions, 27 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 7ddd5b8a58129..e02890b113861 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -8,7 +8,16 @@ 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; }; + + /* List of all Nix system doubles the nixpkgs flake will expose the package set + for. All systems listed here must be supported by nixpkgs as `localSystem`. + + **Warning**: This attribute is considered experimental and is subject to change. + */ + flakeExposed = import ./flake-systems.nix { }; + + # TODO(@sternenseemann): remove before 21.11 + supported = throw "2022-05-23: Use lib.systems.flakeExposed instead of lib.systems.supported.hydra, as lib.systems.supported has been removed"; # Elaborate a `localSystem` or `crossSystem` so that it contains everything # necessary. diff --git a/lib/systems/flake-systems.nix b/lib/systems/flake-systems.nix new file mode 100644 index 0000000000000..74124c32e8369 --- /dev/null +++ b/lib/systems/flake-systems.nix @@ -0,0 +1,29 @@ +# See [RFC 46] for mandated platform support and ../../pkgs/stdenv for +# implemented platform support. This list is mainly descriptive, i.e. all +# system doubles for platforms where nixpkgs can do native compiliation +# reasonably well are included. +# +# [RFC 46]: https://github.com/NixOS/rfcs/blob/master/rfcs/0046-platform-support-tiers.md +{ }: + +[ + # Tier 1 + "x86_64-linux" + # Tier 2 + "aarch64-linux" + "x86_64-darwin" + # Tier 3 + "armv6l-linux" + "armv7l-linux" + "i686-linux" + "mipsel-linux" + + # Other platforms with sufficient support in stdenv which is not formally + # mandated by their platform tier. + "aarch64-darwin" + "armv5tel-linux" + "powerpc64le-linux" + "riscv64-linux" + + # "x86_64-freebsd" is excluded because it is mostly broken +] diff --git a/lib/systems/supported.nix b/lib/systems/supported.nix deleted file mode 100644 index a1c038a5c8bc0..0000000000000 --- a/lib/systems/supported.nix +++ /dev/null @@ -1,26 +0,0 @@ -# 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 ++ [ - "aarch64-darwin" - ]; - - tier1 = [ - "x86_64-linux" - ]; - - tier2 = [ - "aarch64-linux" - "x86_64-darwin" - ]; - - tier3 = [ - "armv6l-linux" - "armv7l-linux" - "i686-linux" - "mipsel-linux" - ]; -} |