I’d like to see a write up about how dynamic derivations could be used to close the gap with Bazel.
Bazel defines dependencies in very fine-grained way, so it’s clear how unnecessary rebuilds can be skipped. With Nix, we tend to have a derivation per binary.
You could handle 99 beers if you do the recursion by decimal digits (keeps max depth to 10+digits). Then, if that weren't sufficient, lower the base and implement binary->decimal encoding, and now max depth is 2+digits. 2^499-2 sounds like a lot of beer.
radex | 15 hours ago
I’d like to see a write up about how dynamic derivations could be used to close the gap with Bazel.
Bazel defines dependencies in very fine-grained way, so it’s clear how unnecessary rebuilds can be skipped. With Nix, we tend to have a derivation per binary.
[OP] fzakaria | 9 hours ago
Please check my other posts. I have many in this space (+ they are linked to the post).
https://fzakaria.com/2025/03/11/nix-dynamic-derivations-a-practical-application
You can define the build graph and decompose the space at build time.
geocar | 19 hours ago
You could handle 99 beers if you do the recursion by decimal digits (keeps max depth to 10+digits). Then, if that weren't sufficient, lower the base and implement binary->decimal encoding, and now max depth is 2+digits. 2^499-2 sounds like a lot of beer.
I am extremely entertained by this today.
[OP] fzakaria | 19 hours ago
that's a pretty funny follow-up. I'm not sure if a
drvcan have > 1 output though to make it work.I wasn't sure about 2^52 should be the beers ? :)
[OP] fzakaria | 19 hours ago
I ended up filing: https://github.com/NixOS/nix/issues/16835
blitz | 8 hours ago
I really like your blog!