nixpkgs/nixos/modules
Adam Joseph c0085404bd lib/systems/inspect.nix: remove isPowerPC
Very confusingly, the `isPowerPC` predicate in
`lib/systems/inspect.nix` does *not* match `powerpc64le`!

This is because `isPowerPC` is defined as

  isPowerPC      = { cpu = cpuTypes.powerpc; };

Where `cpuTypes.powerpc` is:

  { bits = 32; significantByte = bigEndian; family = "power"; };

This means that the `isPowerPC` predicate actually only matches the
subset of machines marketed under this name which happen to be 32-bit
and running in big-endian mode which is equivalent to:

  with stdenv.hostPlatform; isPower && isBigEndian && is32bit

This seems like a sharp edge that people could easily cut themselves
on.  In fact, that has already happened: in
`linux/kernel/common-config.nix` there is a test which will always
fail:

  (stdenv.hostPlatform.isPowerPC && stdenv.hostPlatform.is64bit)

A more subtle case of the strict isPowerPC being used instead of the
moreg general isPower accidentally are the GHC expressions:

  Update pkgs/development/compilers/ghc/8.10.7.nix
  Update pkgs/development/compilers/ghc/8.8.4.nix
  Update pkgs/development/compilers/ghc/9.2.2.nix
  Update pkgs/development/compilers/ghc/9.0.2.nix
  Update pkgs/development/compilers/ghc/head.nix

Since the remaining legitimate use sites of isPowerPC are so few, remove
the isPowerPC predicate completely. The alternative expression above is
noted in the release notes as an alternative.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2022-05-25 09:45:42 +02:00
..
config Merge pull request #168168 from fedeinthemix/home-mode 2022-05-23 12:27:49 +02:00
hardware nixos: don't put non-firmware in hardware.firmware 2022-05-12 15:17:51 +00:00
i18n/input-method nixos/fcitx5: add the setting of RIME_DATA_DIR and options for rime-data 2022-04-25 13:39:19 +08:00
installer lib/systems/inspect.nix: remove isPowerPC 2022-05-25 09:45:42 +02:00
misc nixos/locate: clarification in warning message (#173247) 2022-05-17 16:47:33 +02:00
profiles Merge pull request #169113 from ElvishJerricco/systemd-stage-1-installer-tests 2022-04-30 13:18:57 -07:00
programs nixos/gnupg: default to a reasonable pinentry program on headless systems 2022-05-18 18:31:34 +02:00
security Merge pull request #156822 from xfix/wrapper-assert-argc-at-least-one 2022-05-16 18:52:51 +02:00
services Merge pull request #174145 from alarsyo/nextcloud24-php8 2022-05-23 20:23:11 +02:00
system Merge pull request #174090 from helsinki-systems/fix/plymouth 2022-05-23 17:08:02 +02:00
tasks Merge pull request #171650 from helsinki-systems/feat/config-systemd-package 2022-05-09 10:23:04 +02:00
testing nixos/version: Warn about using the default of system.stateVersion 2022-05-05 12:22:31 +02:00
virtualisation Merge pull request #172131 from euank/ena-2.7.1 2022-05-12 01:38:24 +03:00
module-list.nix Merge pull request #163220 from fleaz/init-r53_ddns 2022-05-22 17:08:55 +02:00
rename.nix nixos/ssmtp: drop module 2022-04-17 00:44:50 +02:00