Skip to content

Comments

nix-cli: use pure/restricted eval for help pages#14086

Merged
edolstra merged 1 commit intoNixOS:masterfrom
getchoo-contrib:getchoo/help-pure-eval
Sep 26, 2025
Merged

nix-cli: use pure/restricted eval for help pages#14086
edolstra merged 1 commit intoNixOS:masterfrom
getchoo-contrib:getchoo/help-pure-eval

Conversation

@getchoo
Copy link
Member

@getchoo getchoo commented Sep 26, 2025

Motivation

Note

This patch was sent to me on Matrix by @xokdvium. Thanks!

This avoids any complications that can arise from the environment
affecting evaluation of the help pages (which don't need to be calling
out to anything external anyways)

A recent example of one of these problems is
#14085, which would break help pages
by causing them to make invalid calls to the dummy store they're
evaluated with

Context

Fixes #14062


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

This avoids any complications that can arise from the environment
affecting evaluation of the help pages (which don't need to be calling
out to anything external anyways)

A recent example of one of these problems is
NixOS#14085, which would break help pages
by causing them to make invalid calls to the dummy store they're
evaluated with

Fixes: NixOS#14062
Co-authored-by: Sergei Zimmerman <sergei@zimmerman.foo>
@getchoo getchoo requested a review from edolstra as a code owner September 26, 2025 06:12
@github-actions github-actions bot added the new-cli Relating to the "nix" command label Sep 26, 2025
@edolstra edolstra merged commit 8aa4669 into NixOS:master Sep 26, 2025
15 checks passed
@getchoo getchoo deleted the getchoo/help-pure-eval branch September 26, 2025 16:27
@xokdvium xokdvium added the backport 2.31-maintenance Automatically creates a PR against the branch label Oct 8, 2025
@internal-nix-ci
Copy link

Successfully created backport PR for 2.31-maintenance:

lf- pushed a commit to lix-project/lix that referenced this pull request Dec 21, 2025
This avoids any complications that can arise from the environment
affecting evaluation of the help pages (which don't need to be calling
out to anything external anyways)

I don't think this is actively causing problems now - though it did in
Nix! - so this is largely preventative, but I don't really see a reason
why this was ever running in impure mode in the first place either

Based-on: NixOS/nix#14086
Co-authored-by: Sergei Zimmerman <sergei@zimmerman.foo>
Change-Id: Ice0c760562d70c09934249edc3b767473516d372
philiptaron added a commit to philiptaron/nixpkgs that referenced this pull request Jan 8, 2026
## Bug fixes (crashes)

- Fix segfaults from `toView()` when compiled with newer nixpkgs (NixOS/nix#14154)
- Fix use-after-move in `DerivationGoal::repairClosure` and `SampleStack` (NixOS/nix#14086)
- Fix assertion failure on partially valid derivation outputs (NixOS/nix#14137)
- Fix `RestrictedStore::addDependency` recursion causing crashes (NixOS/nix#14729)
- Fix crash on flakerefs containing newlines (NixOS/nix#14450)

## Bug fixes (functionality)

- Fix fakeSSH check breaking SSH copies with `user@host` format (NixOS/nix#14150)
- Fix `builtins.dirOf` regression from Nix 2.23 (NixOS/nix#14515)
- Restore missing `isAllowed` check in `ChrootLinuxDerivationBuilder` (NixOS/nix#14531)
- Fix curl with c-ares failing to resolve DNS in sandbox on macOS (NixOS/nix#14792)
- Fix tarball percent decoding for `file://` URIs (NixOS/nix#14729)
- `exportReferencesGraph`: Handle heterogeneous arrays (NixOS/nix#13861)
- Fix filesystem ops in store optimization (NixOS/nix#14676)

## Bug fixes (output)

- Fix double-quoting of paths in logs (NixOS/nix#14210)
- Include path in world-writable error messages (NixOS/nix#14785)

## Improvements

- Better git refnames validation (NixOS/nix#14253)
- Use pure/restricted eval for help pages (NixOS/nix#14156)
- Improve store-reference compatibility with IPv6 ZoneId literals (NixOS/nix#14134)
- Correct `build-dir` error in manual (NixOS/nix#14745)

## Build system

- Add mdbook 0.5 support (NixOS/nix#14690)
- Drop legacy Apple SDK pattern (NixOS/nix#13976)

https://github.com/NixOS/nix/releases/tag/2.31.3
philiptaron added a commit to philiptaron/nixpkgs that referenced this pull request Jan 8, 2026
Changelog of fixes:

## Bug fixes (crashes)

- Fix segfaults from `toView()` when compiled with newer nixpkgs (NixOS/nix#14154)
- Fix use-after-move in `DerivationGoal::repairClosure` and `SampleStack` (NixOS/nix#14086)
- Fix assertion failure on partially valid derivation outputs (NixOS/nix#14137)
- Fix `RestrictedStore::addDependency` recursion causing crashes (NixOS/nix#14729)
- Fix crash on flakerefs containing newlines (NixOS/nix#14450)

## Bug fixes (functionality)

- Fix fakeSSH check breaking SSH copies with `user@host` format (NixOS/nix#14150)
- Fix `builtins.dirOf` regression from Nix 2.23 (NixOS/nix#14515)
- Restore missing `isAllowed` check in `ChrootLinuxDerivationBuilder` (NixOS/nix#14531)
- Fix curl with c-ares failing to resolve DNS in sandbox on macOS (NixOS/nix#14792)
- Fix tarball percent decoding for `file://` URIs (NixOS/nix#14729)
- `exportReferencesGraph`: Handle heterogeneous arrays (NixOS/nix#13861)
- Fix filesystem ops in store optimization (NixOS/nix#14676)

## Bug fixes (output)

- Fix double-quoting of paths in logs (NixOS/nix#14210)
- Include path in world-writable error messages (NixOS/nix#14785)

## Improvements

- Better git refnames validation (NixOS/nix#14253)
- Use pure/restricted eval for help pages (NixOS/nix#14156)
- Improve store-reference compatibility with IPv6 ZoneId literals (NixOS/nix#14134)
- Correct `build-dir` error in manual (NixOS/nix#14745)

## Build system

- Add mdbook 0.5 support (NixOS/nix#14690)
- Drop legacy Apple SDK pattern (NixOS/nix#13976)

https://github.com/NixOS/nix/releases/tag/2.31.3
philiptaron added a commit to philiptaron/nixpkgs that referenced this pull request Jan 15, 2026
Changelog of fixes:

## Bug fixes (crashes)

- Fix segfaults from `toView()` when compiled with newer nixpkgs (NixOS/nix#14154)
- Fix use-after-move in `DerivationGoal::repairClosure` and `SampleStack` (NixOS/nix#14086)
- Fix assertion failure on partially valid derivation outputs (NixOS/nix#14137)
- Fix `RestrictedStore::addDependency` recursion causing crashes (NixOS/nix#14729)
- Fix crash on flakerefs containing newlines (NixOS/nix#14450)

## Bug fixes (functionality)

- Fix fakeSSH check breaking SSH copies with `user@host` format (NixOS/nix#14150)
- Fix `builtins.dirOf` regression from Nix 2.23 (NixOS/nix#14515)
- Restore missing `isAllowed` check in `ChrootLinuxDerivationBuilder` (NixOS/nix#14531)
- Fix curl with c-ares failing to resolve DNS in sandbox on macOS (NixOS/nix#14792)
- Fix tarball percent decoding for `file://` URIs (NixOS/nix#14729)
- `exportReferencesGraph`: Handle heterogeneous arrays (NixOS/nix#13861)
- Fix filesystem ops in store optimization (NixOS/nix#14676)

## Bug fixes (output)

- Fix double-quoting of paths in logs (NixOS/nix#14210)
- Include path in world-writable error messages (NixOS/nix#14785)

## Improvements

- Better git refnames validation (NixOS/nix#14253)
- Use pure/restricted eval for help pages (NixOS/nix#14156)
- Improve store-reference compatibility with IPv6 ZoneId literals (NixOS/nix#14134)
- Correct `build-dir` error in manual (NixOS/nix#14745)

## Build system

- Add mdbook 0.5 support (NixOS/nix#14690)
- Drop legacy Apple SDK pattern (NixOS/nix#13976)

https://github.com/NixOS/nix/releases/tag/2.31.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.31-maintenance Automatically creates a PR against the branch new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nix help pages are broken

3 participants