[Nix-dev] Inexplicable replaceRuntimeDependencies assertion failure

Shea Levy shea at shealevy.com
Sun Dec 4 03:58:47 CET 2016


Hi Mark,

I can't answer your specific case without seeing the details of man-db,
but are you sure you want replaceRuntimeDependencies here and not
packageOverrides? replaceRuntimeDependencies is for when you need to do
a binary patching of a whole tree while you wait for a proper rebuild to
finish, not general dependency changing.

> 2) Why does the assertion even exist?

replace-dependency.nix works by hash-rewriting: A store path is
serialized, every instance of, say,
'1cyrk96c7dfvrxa1896c4i91zmizm280-firefox-49.0.2' is replaced with, say
'9hfv8iwb1k5mnpkaliswsgs1sv7px2x2-firefox-49.0.2'. If the name (in this
example, "firefox-49.0.2") were not the same length, then the
replacement wouldn't work, because we don't know which offsets and sizes
to change in the files to correspond to that change.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20161203/b31d4baf/attachment.sig>


More information about the nix-dev mailing list