Skip to content

[Backport release-23.11] lib.systems.elaborate: fix passing rust (more)#271790

Merged
yu-re-ka merged 1 commit intorelease-23.11from
backport-271707-to-release-23.11
Dec 3, 2023
Merged

[Backport release-23.11] lib.systems.elaborate: fix passing rust (more)#271790
yu-re-ka merged 1 commit intorelease-23.11from
backport-271707-to-release-23.11

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Dec 3, 2023

Bot-based backport to release-23.11, triggered by a label in #271707.

  • Before merging, ensure that this backport is acceptable for the release.
    • Even as a non-commiter, if you find that it is not acceptable, leave a comment.

An important idea around the rust stuff in lib.systems is that it's
elaborated — this means that it should idempotently add to the values
passed in, if any.  But we missed that the names used for the
parameter and the elaborated value for "rustcTarget"/"config" didn't
line up.  The intention was to use "rustcTarget" everywhere in the new
interface, as a more descriptive name than "config".

This fixes setting the system in NixOS configuration, which results in
an already elaborated system being elaborated again.  Before, this
wouldn't produce the correct result:

% nix-instantiate --eval -A stdenv.hostPlatform.rust.rustcTarget --system armv7l-linux
"armv7-unknown-linux-gnueabihf"
% NIX_PATH= nix-instantiate --eval -E '(import nixos/lib/eval-config.nix { system = "armv7l-linux"; modules = []; }).pkgs.stdenv.hostPlatform.rust.rustcTarget'
"arm-unknown-linux-gnueabihf"

Fixes: e3e57b8 ("lib.systems: elaborate Rust metadata")
Fixes: #271000
(cherry picked from commit 4d23987)
@github-actions github-actions bot requested a review from a user December 3, 2023 00:32
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 3, 2023
@yu-re-ka yu-re-ka merged commit f8a9aa9 into release-23.11 Dec 3, 2023
@yu-re-ka yu-re-ka deleted the backport-271707-to-release-23.11 branch December 3, 2023 08:30
@mikatammi mikatammi mentioned this pull request Dec 6, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 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.

2 participants