Skip to content

Expose the Rust kernel's import-from-derivation input - #122

Merged
thomasjm merged 1 commit into
mainfrom
seed-rust-ifd-into-binary-cache
Oct 13, 2026
Merged

thomasjm merged 1 commit into
mainfrom
seed-rust-ifd-into-binary-cache

Conversation

@thomasjm

Copy link
Copy Markdown
Contributor

Evaluating a Rust environment forces Cargo-nix: overrideInputs imports its crate-names.nix and vendorDependencies callPackages its default.nix. Nix has to realise it before it can finish evaluating the environment, and so before it can substitute the environment's own output.

Nothing the environment produces refers to Cargo-nix, so it is absent from the closure, and a consumer that seeds a binary cache from that closure leaves an offline builder unable to evaluate the environment at all. It falls back to building a stdenv from source and dies fetching stage0-posix.

makeEnvironment now carries passthru.evalTimeDerivations, collected from the kernels, language servers, exporters and packages it built. The Rust kernel is the only current contributor; everything else yields an empty list. Nothing is added to any output, so no derivation changes.

Consumed by codedown's test binary cache, which adds these to its root paths.

Evaluating a Rust environment forces Cargo-nix: overrideInputs imports its
crate-names.nix and vendorDependencies callPackages its default.nix. Nothing the
environment produces refers to it, so it is absent from the closure a consumer
would seed a binary cache with, and an offline builder cannot evaluate the
environment at all.
@thomasjm
thomasjm merged commit 0c7e936 into main Oct 13, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant