1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-07 01:21:00 +01:00

Stratify ExtraPathInfo along Installable hierarchy

Instead of having a bunch of optional fields, have a few subclasses
which can have mandatory fields.

Additionally, the new `getExtraPathInfo`, and `nixpkgsFlakeRef`, are
moved to `InstallableValue`.

I did these things because https://github.com/NixOS/rfcs/pull/134 ; with
these things moved to `InstallableValue`, the base `Installable` no
longer depends on libexpr! This is a major step towards that.

Also, add a bunch of doc comments for sake of the internal API docs.
This commit is contained in:
John Ericson 2023-02-05 23:28:18 -05:00
parent e00abd3f56
commit 256f3e3063
12 changed files with 254 additions and 76 deletions

View file

@ -10,7 +10,10 @@ std::string InstallableDerivedPath::what() const
DerivedPathsWithInfo InstallableDerivedPath::toDerivedPaths()
{
return {{.path = derivedPath, .info = {} }};
return {{
.path = derivedPath,
.info = make_ref<ExtraPathInfo>(),
}};
}
std::optional<StorePath> InstallableDerivedPath::getStorePath()