nixpkgs-suyu/lib/systems
Adam Joseph 006c38fa53 platforms.nix: use {} on failed detection instead of silently assuming pc
This patch causes the autodetection code in lib/systems/platforms.nix
to return {} if it cannot detect the platform and one of the
platform.nix-detection-provided attributes (linux-kernel, gcc, and
rustc) are accessed, rather than silently assuming the "pc" platform
as was previously done.

It is definitely safe to assume that code using these attributes is
prepared to deal with `gcc` and `rustc` not being defined, because
many of the working entries in this file don't define it.

Regarding `linux-kernel` the situation is less certain, but some code
(`lib/systems/default.nix` for example) is already designed to deal
with that attribute being missing.  At worst it would result in an
"attribute not found" error.

While adding mips64el bootstrap support to nixpkgs, the silent
assumption that mips64el routers are actually Intel PCs caused
significant frustration.  This commit removes that assumption in order
to save people who port nixpkgs to new platforms in the future from
this frustration.
2022-05-03 13:31:41 -07:00
..
architectures.nix lib: Clean up how linux and gcc config is specified 2021-01-23 10:01:28 -05:00
default.nix lib/systems: add mips64el definitions 2022-03-10 20:30:16 -08:00
doubles.nix lib/systems: add mips64el definitions 2022-03-10 20:30:16 -08:00
examples.nix Ericson2314's suggestion here: https://github.com/NixOS/nixpkgs/pull/161158#discussion_r822295406 2022-03-10 20:30:19 -08:00
inspect.nix lib/systems: add mips64el definitions 2022-03-10 20:30:16 -08:00
parse.nix lib/systems: add mips64el definitions 2022-03-10 20:30:16 -08:00
platforms.nix platforms.nix: use {} on failed detection instead of silently assuming pc 2022-05-03 13:31:41 -07:00
supported.nix lib.systems.supported: remove aarch64-darwin from Tier 3 list 2021-12-16 17:51:21 +01:00