chore(core): teach mass-rebuild-combined.py about flakes
What changed, and why it matters
This is a small developer-tooling fix. It changes an internal build helper script so that it uses a newer Nix command ('nix develop') when the project has a 'flake.lock' file, instead of the older 'nix-shell'. The change only affects how the team runs internal rebuilds and has no security relevance for users of Trezor devices or firmware.
No security action needed. Treat as routine build-script maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies core/tools/mass-rebuild-combined.py to prefer ‘nix develop –command uv run {}’ when a flake.lock is present, falling back to the previous nix-shell-based commands for uv.lock or poetry.lock. The change addresses a local SSL certificate resolution failure that occurs with ‘nix-shell –pure’ under Nix flakes. It is a build-environment adaptation, not a code or cryptographic change.
Changed components
core/tools/mass-rebuild-combined.pyInspect captured patch +3 / −1
### core/tools/mass-rebuild-combined.py
@@ -145,7 +145,9 @@ def __init__(self, model: str, repo_dir: Path) -> None:
self.env_setup = ["ln -s ci/pyright ."]
# Poetry or uv?
- if (repo_dir / "uv.lock").is_file():
+ if (repo_dir / "flake.lock").is_file():
+ self.env_fmt = "nix develop --command uv run {}"
+ elif (repo_dir / "uv.lock").is_file():
self.env_fmt = 'nix-shell --pure --run "uv run {}"'
elif (repo_dir / "poetry.lock").is_file():
self.env_setup.append('nix-shell --pure --run "poetry install"')Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.