nixpkgs/lib
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
..
systems lib/systems/inspect.nix: remove isPowerPC 2022-05-25 09:45:42 +02:00
tests Merge pull request #168374 from Ma27/special-attrs-in-with-recursion 2022-05-23 17:55:18 +02:00
asserts.nix lib/asserts: use throw to display message for assertMsg 2022-01-19 00:50:06 +01:00
attrsets.nix lib.foldAttrs: Clarify example 2022-05-10 07:01:00 +02:00
cli.nix
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 Revert "lib: init flakes.nix" 2022-05-15 22:39:46 +12: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 lib/generators: withRecursion: don't break attr-sets with special attrs 2022-04-12 12:34:23 +02:00
kernel.nix Merge pull request #84032 from teto/fix_kernel_merge 2020-05-22 13:32:22 +02:00
licenses.nix lib.licenses: add DRL-1.0 2022-05-10 11:11:40 +02:00
lists.nix lib.lists: Use builtins.groupBy for lib.groupBy 2022-03-18 00:05:10 +01:00
meta.nix lib/meta: add getExe to get the main program of a drv 2022-04-24 04:19:49 +03:00
minver.nix Bump minver.nix to 2.2 2020-06-04 13:43:10 +02:00
modules.nix Merge pull request #167776 from hercules-ci/lib-modules-allow-disable-_modules.args-docs-internal 2022-04-30 13:43:08 +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 lib/strings/toShellVars: handle derivations as strings 2022-05-07 17:01:51 +02:00
trivial.nix 22.11 is Raccoon 2022-05-23 20:08:07 +02:00
types.nix Merge pull request #172813 from hercules-ci/functionTo-properly 2022-05-17 22:22:21 +02:00
versions.nix
zip-int-bits.nix