Get deriver when passing --derivation
This makes Nix look up paths derivations when they are passed as a store paths. So: $ nix path-info --derivation /nix/store/0pisd259nldh8yfjvw663mspm60cn5v8-hello-2.10 now gives /nix/store/qp724w90516n4bk5r9gfb37vzmqdh3z7-hello-2.10.drv instead of "". If no deriver is available, Nix now errors instead of silently ignoring that argument.
This commit is contained in:
parent
8d651a1f68
commit
428062e578
1 changed files with 2 additions and 4 deletions
|
@ -754,10 +754,8 @@ std::set<RealisedPath> toRealisedPaths(
|
||||||
if (mode == Realise::Nothing)
|
if (mode == Realise::Nothing)
|
||||||
settings.readOnlyMode = true;
|
settings.readOnlyMode = true;
|
||||||
|
|
||||||
for (auto & i : installables)
|
auto drvPaths = toDerivations(store, installables, true);
|
||||||
for (auto & b : i->toDerivedPathsWithHints())
|
res.insert(drvPaths.begin(), drvPaths.end());
|
||||||
if (auto bfd = std::get_if<DerivedPathWithHints::Built>(&b))
|
|
||||||
res.insert(bfd->drvPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in a new issue