beer.drv.drv.drv

Have you heard about dynamic derivations?

They are an experimental-feature in Nix that lets a derivation produce other derivations as its output. Why ? This lets you dynamically create your build graph, instead of having to know it all at evaluation time. It’s Nix’s answer to try and match the build speed of other build systems like Bazel or buck2.

So hot right now meme: Mugatu from Zoolander under the caption "Dynamic derivations", above "So hot right now"

There is not much written about dynamic derivations, and the documentation is sparse. I have written a few posts about them, so I sometimes get questions about them.

Recently, I got a DM from Evan Porter over LinkedIn, the ultimate bug triaging network, about whether it is possible to query the deriver of a dynamic derivation to get the initial derivation.