As noticed by @yu-re-ka, trying to use pkgs.replaceDependency (or system.replaceRuntimeDependencies in NixOS) in pure evaluation mode results in an error because builtins.storePath is used.
From looking at the source, I couldn't figure out why we need storePath at all. It seems like manipulating context-discarded strings would be enough?
However I'm having trouble testing this because for some reason my system.build.toplevel.outPath is something like /0apn2h3i9xvwfaac83238x97plr9dsn33pxlj7f5mdblc7f6bg9i (which looks like the sort of string that builtins.placeholder produces) instead of an actual store path, so I just get a warning that the placeholder does not depend on $oldDependency. Any idea what's going on here?
ping @shlevy @roconnor
As noticed by @yu-re-ka, trying to use
pkgs.replaceDependency(orsystem.replaceRuntimeDependenciesin NixOS) in pure evaluation mode results in an error becausebuiltins.storePathis used.From looking at the source, I couldn't figure out why we need
storePathat all. It seems like manipulating context-discarded strings would be enough?However I'm having trouble testing this because for some reason my
system.build.toplevel.outPathis something like/0apn2h3i9xvwfaac83238x97plr9dsn33pxlj7f5mdblc7f6bg9i(which looks like the sort of string thatbuiltins.placeholderproduces) instead of an actual store path, so I just get a warning that the placeholder does not depend on$oldDependency. Any idea what's going on here?ping @shlevy @roconnor