mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 15:26:03 +03:00
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.
This commit is contained in:
parent
6d82088583
commit
168b926435
@ -11,9 +11,7 @@
|
||||
|
||||
lib = import ./lib;
|
||||
|
||||
systems = lib.systems.supported.hydra;
|
||||
|
||||
forAllSystems = f: lib.genAttrs systems (system: f system);
|
||||
forAllSystems = f: lib.genAttrs lib.systems.flakeExposed (system: f system);
|
||||
|
||||
in
|
||||
{
|
||||
|
@ -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.
|
||||
|
29
lib/systems/flake-systems.nix
Normal file
29
lib/systems/flake-systems.nix
Normal file
@ -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
|
||||
]
|
@ -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"
|
||||
];
|
||||
}
|
@ -583,6 +583,15 @@
|
||||
<literal>/etc/containers</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>lib.systems.supported</literal> has been removed, as
|
||||
it was overengineered for determining the systems to support
|
||||
in the nixpkgs flake. The list of systems exposed by the
|
||||
nixpkgs flake can now be accessed as
|
||||
<literal>lib.systems.flakeExposed</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
For new installations
|
||||
|
@ -193,6 +193,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
This is to improve compatibility with `libcontainer` based software such as Podman and Skopeo
|
||||
which assumes they have ownership over `/etc/containers`.
|
||||
|
||||
- `lib.systems.supported` has been removed, as it was overengineered for determining the systems to support in the nixpkgs flake. The list of systems exposed by the nixpkgs flake can now be accessed as `lib.systems.flakeExposed`.
|
||||
|
||||
- For new installations `virtualisation.oci-containers.backend` is now set to `podman` by default.
|
||||
If you still want to use Docker on systems where `system.stateVersion` is set to to `"22.05"` set `virtualisation.oci-containers.backend = "docker";`.Old systems with older `stateVersion`s stay with "docker".
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user