Skip to content

treewide: prepare Rust packages for structuredAttrs by putting variables in env#472376

Merged
wolfgangwalther merged 21 commits intoNixOS:masterfrom
SFrijters:rust-packages-structuredattrs
Jan 7, 2026
Merged

treewide: prepare Rust packages for structuredAttrs by putting variables in env#472376
wolfgangwalther merged 21 commits intoNixOS:masterfrom
SFrijters:rust-packages-structuredattrs

Conversation

@SFrijters
Copy link
Copy Markdown
Member

These are necessary but possibly insufficient fixes: moving environment variables into env.{ ... }.

Tested with __structuredAttrs = true; for cargo, clippy, and rustfmt.

Updated the other packages found by grepping for RUSTC_BOOTSTRAP.

Should be a zero rebuild scenario, I hope?

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@SFrijters SFrijters force-pushed the rust-packages-structuredattrs branch from 4dbb32e to 6712843 Compare December 19, 2025 13:20
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Dec 19, 2025
@SFrijters
Copy link
Copy Markdown
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 472376
Commit: 6712843d3a748f71447dcb1c54ede3dfe9a42a76

@nixpkgs-ci nixpkgs-ci bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Dec 19, 2025
@nixpkgs-ci nixpkgs-ci bot added the 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. label Dec 19, 2025
@SFrijters SFrijters changed the title treewide: prepare Rust packages for structuredAttrs treewide: prepare Rust packages for structuredAttrs by putting variables in env Dec 19, 2025
Copy link
Copy Markdown
Contributor

@Mindavi Mindavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and will help others prepare the same way when copying from one of these.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Dec 22, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Jan 1, 2026
Copy link
Copy Markdown
Contributor

@wolfgangwalther wolfgangwalther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM

@wolfgangwalther wolfgangwalther added this pull request to the merge queue Jan 7, 2026
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Jan 7, 2026
Merged via the queue into NixOS:master with commit 919dcd0 Jan 7, 2026
38 checks passed
@vcunat
Copy link
Copy Markdown
Member

vcunat commented Jan 8, 2026

As discussed on chat, this is a mass rebuild (about 50k jobs on Hydra). No idea why it hasn't been detected, but except for x86_64-linux it rebuilds cargo via introducing empty RUSTFLAGS.

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Jan 8, 2026

I was re-checking it by commands like

nix eval -f. cargo.outPath --argstr system aarch64-linux

on the merge commit and on its first parent.

@wolfgangwalther
Copy link
Copy Markdown
Contributor

Thanks for reverting, @SFrijters you'll want to target staging with this again.

It seems like CI didn't run to completion on this one (?), at least there is a red X on the last commit somehow. Not sure why it was possible to merge and why it was labeled with rebuilds and... @NixOS/nixpkgs-ci you might be interested in this.

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Jan 8, 2026

I've already notified https://matrix.to/#/#nixpkgs-ci:nixos.org

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Jan 8, 2026

I suspect the timing of force-pushes played a role.

@wolfgangwalther
Copy link
Copy Markdown
Contributor

wolfgangwalther commented Jan 8, 2026

It seems like CI didn't run to completion on this one (?), at least there is a red X on the last commit somehow.

Actually that red X was from a re-run triggered by @vcunat after the PR was already merged. Looking at the original run, everything passed.

The labels were 3 weeks old. I suspect that this only turned into a mass-rebuild within the last few weeks? That's the most likely explanation.

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Jan 8, 2026

Looking at the UI here, the last push happened 6 minutes before the labels got applied.

@wolfgangwalther
Copy link
Copy Markdown
Contributor

Looking at the UI here, the last push happened 6 minutes before the labels got applied.

Which is exactly the time that CI needs to run, so that's perfectly fine. The very first push didn't apply labels, because CI failed on that commit, so they only appeared after the second (and last) push. But as I said earlier, this was 3 weeks ago, so the mass rebuild was introduced on master inbetween.

@SFrijters
Copy link
Copy Markdown
Member Author

Sorry for the mess - I do blindly follow CI for systems I can't build myself.

Just now I wanted to create a new branch/PR for staging and cherry-pick the commits on there, but they are all already on staging. Did master get merged into staging before this PR got reverted on master?

@SFrijters
Copy link
Copy Markdown
Member Author

As discussed on chat, this is a mass rebuild (about 50k jobs on Hydra). No idea why it hasn't been detected, but except for x86_64-linux it rebuilds cargo via introducing empty RUSTFLAGS.

Not trying to nit-pick but just checking that we're on the same page: the effect is that an existing RUSTFLAGS = null; gets removed, right?

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Jan 8, 2026

Did master get merged [...]

Now I merged master into staging manually, so I think you should be good.

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Jan 8, 2026

Generally null values get ignored but empty strings get defined as empty existing env vars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants