Skip to content

Simplify nix develop "gathering derivation environment"#14641

Merged
Ericson2314 merged 4 commits intoNixOS:masterfrom
obsidiansystems:simplify-nix-develop
Nov 25, 2025
Merged

Simplify nix develop "gathering derivation environment"#14641
Ericson2314 merged 4 commits intoNixOS:masterfrom
obsidiansystems:simplify-nix-develop

Conversation

@Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Nov 25, 2025

Motivation

Before, had some funny logic with an unnecessary is CA enabled branch, and erroneous use of the comma operator. Now, take advantage of the new Derivation::fillInOutputPaths to fill in input addresses (and env vars) in a much-more lightweight manner.

Also, fix nix develop on fixed-output derivations so that weird things don't happen when we have that experimental feature enabled.

Context

As a slight behavior change, if the original derivation was content-addressing this one will be too, but I really don't think that matters --- if anything, it is a slight improvement for users that have already opted into content-addressing anyways.


Add 👍 to pull requests you find important.

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

@github-actions github-actions bot added the new-cli Relating to the "nix" command label Nov 25, 2025
Without this change, when one runs wit with `meson test --interactive`,
that command will block waiting on standard input to be closed.
It half works today, we should fix this but also not regress it!
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Nov 25, 2025
@Ericson2314
Copy link
Member Author

I found another bug with fixed-output derivations and also fixed it.

Before, had some funny logic with an unnecessary is CA enabled branch,
and erroneous use of the comma operator. Now, take advantage of the new
`Derivation::fillInOutputPaths` to fill in input addresses (and output
path env vars) in a much-more lightweight manner.

Also, fix `nix develop` on fixed-output derivations so that weird things
don't happen when we have that experimental feature enabled.

As a slight behavior change, if the original derivation was
content-addressing this one will be too, but I really don't think that
matters --- if anything, it is a slight improvement for users that have
already opted into content-addressing anyways.
It's very weird it doesn't work here, but I don't mind not debugging
this now as I just added this part of the functional test --- it's
already better than it was before.
@Ericson2314 Ericson2314 disabled auto-merge November 25, 2025 18:37
@Ericson2314 Ericson2314 added this pull request to the merge queue Nov 25, 2025
Merged via the queue into NixOS:master with commit 423e732 Nov 25, 2025
16 checks passed
@Ericson2314 Ericson2314 deleted the simplify-nix-develop branch November 25, 2025 19:46
@edolstra edolstra mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants