Is patch deployment currently implemented?

I’m reading the Nix Thesis by @edolstra right now and found chapter 7.5 Patch deployment very interesting. It seems like a non-trivial but hugely beneficial optimization and was wondering whether it was currently implemented in nix and nixpkgs?

I looked in the manuals but found no mention of it, which makes sense as it would be an implementation detail, transparent to the user.

From my own use of nix, I can’t really tell either. If I had to guess I’d say it’s not implemented.

1 Like

There is the system.replaceRuntimeDependencies option in NixOS, but that’s not really the same thing. AFAIK, the concept as described in the thesis is not something you can use today.

2 Likes

No, we lost binary patching when the binary cache substituter was implemented. Before that, Nix downloaded a file like this one that contained all the available NARs and patches.

3 Likes