Re:The Curse of NixOS
by watusername on Monday January 24, 2022 @11:16AM
(#30059585)
Yes, there is system.replaceRuntimeDependencies [1] that does what you ask: It replaces dependencies recursively in derivation outputs through binary patching, creating _new_ store paths (so immutability is preserved). It does so by replacing all occurrences of the store paths of the original dependency (e.g., libc) with the new ones [2].
[1] https://search.nixos.org/options?channel=21.11&show=system.r...
[2] https://github.com/NixOS/nixpkgs/blob/fad04722fc3d692e3511e5...