Skip to content

replaceDependency can't be used in pure evaluation mode #199162

@ncfavier

Description

@ncfavier

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions