Commit Graph

2 Commits

Author SHA1 Message Date
Alois Wohlschlager
3616cfb8d9 replaceDependencies: add support for ca-derivations
Unlike regular input-addressed or fixed-output derivations, floating and
deferred derivations do not have their store path available at evaluation time,
so their outPath is a placeholder. The following changes are needed for
replaceDependencies to continue working:
* Detect the placeholder and retrieve the store path using another IFD hack
  when collecting the rewrite plan.
* Try to obtain the derivation name needed for replaceDirectDependencies from
  the derivation arguments if a placeholder is detected.
* Move the length mismatch detection to build time, since the placeholder has a
  fixed length which is unrelated to the store path.
2024-09-24 12:20:15 +02:00
Alois Wohlschlager
59ca239d1a replaceDirectDependencies: split off from replaceDependencies
This allows both swapping out and reusing the rewrite machinery.
2024-09-24 12:20:15 +02:00