4 ms·
Yes, there is system.replaceRuntimeDependencies [1] that does what you ask: It replaces dependencies recursively in derivation outputs through binary patching,
by watusername 5y ago
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.replaceRuntimeDependencies&from=0&size=50&sort=relevance&type=packages&query=replaceRuntimeDependencies https://search.nixos.org/options?channel=21.11&show=system.r...
[2] https://github.com/NixOS/nixpkgs/blob/fad04722fc3d692e3511e58e337ec9fa627f5ba5/pkgs/build-support/replace-dependency.nix#L3-L19 https://github.com/NixOS/nixpkgs/blob/fad04722fc3d692e3511e5...