From 9a6837d6029e9ff2800a1344781375557da23c5c Mon Sep 17 00:00:00 2001 From: Lorenzo Manacorda Date: Tue, 25 Jul 2023 13:40:09 +0200 Subject: [PATCH 1/3] doc: Document Platform Support Tiers As required by [RFC046](https://github.com/7c6f434c/rfcs/blob/platform-support-tiers/rfcs/0046-platform-support-tiers.md). --- doc/manual.md.in | 5 ++ doc/stdenv/platform-support-tiers.chapter.md | 87 ++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 doc/stdenv/platform-support-tiers.chapter.md diff --git a/doc/manual.md.in b/doc/manual.md.in index a4a73a913097a..46821be05ed68 100644 --- a/doc/manual.md.in +++ b/doc/manual.md.in @@ -12,3 +12,8 @@ stdenv.md builders.md contributing.md ``` + +```{=include=} appendix +stdenv/platform-support-tiers.chapter.md +``` + diff --git a/doc/stdenv/platform-support-tiers.chapter.md b/doc/stdenv/platform-support-tiers.chapter.md new file mode 100644 index 0000000000000..cf44840ee7c1c --- /dev/null +++ b/doc/stdenv/platform-support-tiers.chapter.md @@ -0,0 +1,87 @@ +# Platform Support Tiers {#platform-support-tiers} + +In the context of Nixpkgs, a *platform* can mean a CPU architecture, a +[cross-compilation](#chap-cross) target or a C library option. + +Nixpkgs defines 7 platform *support tiers*, meaning levels of support for each platform. + +**TODO**: change build successfully to a definition of "work". + +## Tier 1 {#platform-support-tier-1} + +These platforms receive the highest level of support, meaning that every +platform-compatible package in Nixpkgs must successfully build in the Hydra and OfBorg CIs. +**TODO**: this seems to not be entirely true for Hydra, but true for OfBorg. + +- `x86_64-linux`, `gcc` + `glibc` + +## Tier 2 {#platform-support-tier-2} + +Many of the packages are required to build successfully on these platforms in CI, the rest are supported on a best-effort basis by dedicated platform maintainers. +**TODO**: link teams + +- `aarch64-linux`, `gcc+glibc` +- `x86_64-darwin`, `clang+Darwin/macOS` + +## Tier 3 {#platform-support-tier-3} + +None of the packages for these platforms are required to build successfully in +CI, but it is expected that most of them will build successfully. + +- `i686-linux`, `gcc`+`glibc` +- `armv{6,7,8}*-linux`, `gcc`+`glibc` +- `armv{6,7,8}*-linux`, `gcc`+`glibc`, cross-compilation +- `aarch64-linux`, `gcc`+`glibc`, cross-compilation +- `mipsel-linux`, `gcc`+`glibc` +- `x86_64-linux`, `gcc`+`musl` + +## Tier 4 {#platform-support-tier-4} + +Some of the packages for these platforms are expected to work. The +[`exotic-platform-maintainers` +Team](https://github.com/orgs/NixOS/teams/exotic-platform-maintainers) is +responsible for this platform. + +- `aarch64-none` +- `avr` +- `arm-none` +- `i686-none` +- `x86_64-none` +- `powerpc-none` +- `powerpcle-none` +- `x86_64-mingw32` +- `i686-mingw32` +- `x86_64-linux`, `gcc`+`musl` — static +- `x86_64-linux`, `clang`+`glibc` +- `x86_64-linux`, `clang`+`glibc` — `llvm` linker +- `x86_64-linux` — Android +- `aarch64-linux` — Android +- `armv{7,8}-linux` — Android + +## Tier 5 {#platform-support-tier-5} + +A small number of packages might build successfully on these platforms. + +- `x86_64-linux`, `gcc`+`glibc` — static +- `x86_64-linux`, `gcc`+`glibc` — `llvm` linker + +## Tier 6 {#platform-support-tier-6} + +These platforms are defined in Nixpkgs, but no packages are expected to build on them. + +- `wasm-wasi` +- `powerpc64le-linux`, `gcc`+`glibc` + +## Tier 7 {#platform-support-tier-7} + +No current support, but previous support or clear path to add support. + +- `aarch64-darwin` +- `i686-darwin` +- `x86_64-freebsd` +- `i686-solaris` +- `x86_64-illumos` + +## Further reading {#platform-support-tiers-further-reading} + +For a formal definition of platform support tiers, see [RFC046](https://github.com/7c6f434c/rfcs/blob/platform-support-tiers/rfcs/0046-platform-support-tiers.md). From 9255f0ca7ae7ac02e610a45447139d1647738386 Mon Sep 17 00:00:00 2001 From: Lorenzo Manacorda Date: Tue, 25 Jul 2023 13:48:01 +0200 Subject: [PATCH 2/3] add more TODOs --- doc/stdenv/platform-support-tiers.chapter.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/stdenv/platform-support-tiers.chapter.md b/doc/stdenv/platform-support-tiers.chapter.md index cf44840ee7c1c..a6f2161f6a755 100644 --- a/doc/stdenv/platform-support-tiers.chapter.md +++ b/doc/stdenv/platform-support-tiers.chapter.md @@ -5,7 +5,8 @@ In the context of Nixpkgs, a *platform* can mean a CPU architecture, a Nixpkgs defines 7 platform *support tiers*, meaning levels of support for each platform. -**TODO**: change build successfully to a definition of "work". +- **TODO**: change "build successfully" to a definition of "work" that includes tests? +- **TODO**: mention binary cache? ## Tier 1 {#platform-support-tier-1} From 83db0cfcc114eb9a56aef5ce0f782a806dc8ce10 Mon Sep 17 00:00:00 2001 From: asymmetric Date: Tue, 1 Aug 2023 10:54:46 +0000 Subject: [PATCH 3/3] Apply suggestions from @amjoseph-nixpkgs Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> --- doc/stdenv/platform-support-tiers.chapter.md | 34 ++++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/stdenv/platform-support-tiers.chapter.md b/doc/stdenv/platform-support-tiers.chapter.md index a6f2161f6a755..9a3fb84e430ba 100644 --- a/doc/stdenv/platform-support-tiers.chapter.md +++ b/doc/stdenv/platform-support-tiers.chapter.md @@ -1,7 +1,6 @@ # Platform Support Tiers {#platform-support-tiers} -In the context of Nixpkgs, a *platform* can mean a CPU architecture, a -[cross-compilation](#chap-cross) target or a C library option. +In the context of Nixpkgs, a *platform* means an attrset which typechecks against `lib.systems.parsed.types.parsedPlatform`. This includes a CPU architecture, bitwidth, and endianness and may also include: an OS kernel, environment (also called "C library"), choice of compiler and linker, option to link statically, and other data. Nixpkgs defines 7 platform *support tiers*, meaning levels of support for each platform. @@ -14,7 +13,7 @@ These platforms receive the highest level of support, meaning that every platform-compatible package in Nixpkgs must successfully build in the Hydra and OfBorg CIs. **TODO**: this seems to not be entirely true for Hydra, but true for OfBorg. -- `x86_64-linux`, `gcc` + `glibc` +- `x86_64-linux-gnu` using `gcc` ## Tier 2 {#platform-support-tier-2} @@ -29,12 +28,12 @@ Many of the packages are required to build successfully on these platforms in CI None of the packages for these platforms are required to build successfully in CI, but it is expected that most of them will build successfully. -- `i686-linux`, `gcc`+`glibc` -- `armv{6,7,8}*-linux`, `gcc`+`glibc` -- `armv{6,7,8}*-linux`, `gcc`+`glibc`, cross-compilation -- `aarch64-linux`, `gcc`+`glibc`, cross-compilation -- `mipsel-linux`, `gcc`+`glibc` -- `x86_64-linux`, `gcc`+`musl` +- `i686-linux-gnu`, `gcc` +- `armv{6,7,8}*-linux-gnu`, `gcc` +- `armv{6,7,8}*-linux-gnu`, `gcc`, cross-compilation +- `aarch64-linux-gnu`, `gcc`, cross-compilation +- `mipsel-linux-gnu`, `gcc` +- `x86_64-linux-musl`, `gcc` ## Tier 4 {#platform-support-tier-4} @@ -50,28 +49,29 @@ responsible for this platform. - `x86_64-none` - `powerpc-none` - `powerpcle-none` +- `powerpc64le-linux-gnu` +- `mips64el-linux-gnuabi64` - `x86_64-mingw32` - `i686-mingw32` -- `x86_64-linux`, `gcc`+`musl` — static -- `x86_64-linux`, `clang`+`glibc` -- `x86_64-linux`, `clang`+`glibc` — `llvm` linker -- `x86_64-linux` — Android -- `aarch64-linux` — Android -- `armv{7,8}-linux` — Android +- `x86_64-linux-musl`, `gcc` — static +- `x86_64-linux-gnu`, `clang` +- `x86_64-linux-gnu`, `clang` — `llvm` linker +- `x86_64-linux-android` +- `aarch64-linux-android` +- `armv{7,8}-linux-android` ## Tier 5 {#platform-support-tier-5} A small number of packages might build successfully on these platforms. - `x86_64-linux`, `gcc`+`glibc` — static -- `x86_64-linux`, `gcc`+`glibc` — `llvm` linker +- `x86_64-linux-gnu`, `gcc` `llvm` linker ## Tier 6 {#platform-support-tier-6} These platforms are defined in Nixpkgs, but no packages are expected to build on them. - `wasm-wasi` -- `powerpc64le-linux`, `gcc`+`glibc` ## Tier 7 {#platform-support-tier-7}