nixpkgs/lib
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
..
systems platforms.nix: use {} on failed detection instead of silently assuming pc 2022-05-03 13:31:41 -07:00
tests Merge pull request #165540 from Infinisil/module-args-docs 2022-04-05 21:51:46 +02:00
asserts.nix lib/asserts: use throw to display message for assertMsg 2022-01-19 00:50:06 +01:00
attrsets.nix Merge pull request #147077 from Infinisil/updateAttrPaths 2022-03-19 19:00:03 +01:00
cli.nix lib/cli: mkKey -> mkOptionName, use generators.mkValueStringDefault 2020-01-23 14:47:38 +01:00
customisation.nix lib/customization: Improve callPackage error message for missing args 2022-04-01 22:03:05 +02:00
debug.nix lib/debug: add traceFnSeqN 2021-01-25 19:25:50 +01:00
default.nix lib/trivial: actually expose warnIfNot and throwIf 2022-03-27 16:48:33 +02:00
deprecated.nix treewide: fold -> foldr 2021-01-26 10:57:07 +07:00
fetchers.nix
filesystem.nix lib: Add readTree function to filesystem 2020-10-19 16:42:21 -07:00
fixed-points.nix lib.compose{Many,}Extensions: Make compatible with nix flake check 2021-08-26 09:12:17 -04:00
flake.nix Fix import path. 2021-08-14 14:46:00 -05:00
generators.nix Merge pull request #131205 from Ma27/showdefs-overflow 2021-09-29 11:03:31 +02:00
kernel.nix Merge pull request #84032 from teto/fix_kernel_merge 2020-05-22 13:32:22 +02:00
licenses.nix Merge pull request #165672 from yoctocell/patatt-init 2022-03-27 14:53:39 +02:00
lists.nix lib.lists: Use builtins.groupBy for lib.groupBy 2022-03-18 00:05:10 +01:00
meta.nix lib/meta: fix typo in platformMatch comment 2022-01-24 12:54:22 -03:00
minver.nix Bump minver.nix to 2.2 2020-06-04 13:43:10 +02:00
modules.nix Merge pull request #165540 from Infinisil/module-args-docs 2022-04-05 21:51:46 +02:00
options.nix Merge remote-tracking branch 'origin/master' into haskell-updates 2022-03-26 09:59:28 +01:00
sources.nix lib.sources: Improve docs 2022-01-30 02:04:51 +01:00
strings-with-deps.nix lib: Use Nix's static scope checking, fix error message, optimize 2020-10-22 13:46:47 +02:00
strings.nix Merge pull request #166383 from hercules-ci/always-sanitize-derivation-name 2022-04-05 20:05:33 +02:00
trivial.nix Merge pull request #164660 from ncfavier/tests-restrict-arguments 2022-03-24 17:01:47 +01:00
types.nix lib/modules: Finally remove deprecated types.optionSet 2022-03-18 04:51:27 +01:00
versions.nix
zip-int-bits.nix