Skip to content

[Backport release-22.11] lib/systems/parse.nix: mkSkeletonFromList: improve readability#202405

Merged
sternenseemann merged 1 commit intorelease-22.11from
backport-180964-to-release-22.11
Nov 22, 2022
Merged

[Backport release-22.11] lib/systems/parse.nix: mkSkeletonFromList: improve readability#202405
sternenseemann merged 1 commit intorelease-22.11from
backport-180964-to-release-22.11

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Bot-based backport to release-22.11, triggered by a label in #180964.

  • Before merging, ensure that this backport complies with the Criteria for Backporting.
    • Even as a non-commiter, if you find that it does not comply, leave a comment.

The main purpose of this PR is to make the basis for
`mkSkeletonFromList`'s decision between `cpu-kernel-libcabi` vs
`cpu-vendor-os` clear, without changing its behavior.  The existing
code obscures this decision behind a sequence of prioritized matches
(i.e. `if-then`) which jump around between different coordinates.

Two side benefits of this PR:

1. It makes the root cause of #165836 obvious: we are missing a case
   for `cpu-vendor-libcabi`.  This is why nixpkgs stumbles over
   `*-none-*`.

2. It illuminates some very weird corner cases in the existing
   logic, like `*-${vendor}-ghcjs` overriding the `vendor` field,
   and `mingw32` being transformed into `windows` in some cases.

Co-authored-by: John Ericson <git@JohnEricson.me>
(cherry picked from commit 36a566b)
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 22, 2022
@sternenseemann sternenseemann merged commit 9883b86 into release-22.11 Nov 22, 2022
@sternenseemann sternenseemann deleted the backport-180964-to-release-22.11 branch November 22, 2022 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant