Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
A locked representation of an environment. More...
#include <lockfile.hh>
Public Member Functions | |
Lockfile (const Lockfile &)=default | |
Lockfile (Lockfile &&)=default | |
Lockfile (LockfileRaw raw) | |
Lockfile (std::filesystem::path lockfilePath) | |
Lockfile & | operator= (const Lockfile &)=default |
Lockfile & | operator= (Lockfile &&)=default |
const LockfileRaw & | getLockfileRaw () const |
Get the raw representation of the lockfile. | |
const ManifestRaw & | getManifestRaw () const |
Get the original manifest used to create the lockfile. | |
const RegistryRaw & | getRegistryRaw () const |
Get the locked registry from the raw lockfile. | |
const EnvironmentManifest & | getManifest () const |
Get old manifest. | |
const std::unordered_map< InstallID, ManifestDescriptor > & | getDescriptors () const |
Get old descriptors. | |
const RegistryRaw & | getPackagesRegistryRaw () const |
Get the packagesRegistryRaw, containing all inputs used by packages.** members of the lockfile. | |
std::size_t | removeUnusedInputs () |
Drop any registry.inputs and registry.priority members that are not explicitly declared in the manifest registry or used by resolved packages. | |
Private Member Functions | |
void | checkGroups () const |
Check the lockfile's packages.** locked inputs align with the requested groups in manifest.install.<INSTALL-ID>.packageGroup , Throws an exception if two packages in the same group use different inputs. | |
void | check () const |
Check the lockfile's validity, throwing an exception for invalid contents. | |
void | init () |
Initialize manifest and packagesRegistryRaw from lockfileRaw. | |
Private Attributes | |
LockfileRaw | lockfileRaw |
EnvironmentManifest | manifest |
RegistryRaw | packagesRegistryRaw |
A locked representation of an environment.
Unlike the raw form, this form is suitable for stashing temporary variables and other information that is not needed for serializing/de-serializing.
|
private |
Check the lockfile's validity, throwing an exception for invalid contents.
This asserts that:
lockfileVersion
is supported.packages
members' groups are enforced.registry.*
and packages.**
members for optional
and systems
skipping.registry
inputs do not use indirect flake references.
|
inline |
Get the packagesRegistryRaw, containing all inputs used by packages.**
members of the lockfile.
This registry keys inputs by their fingerprints.
std::size_t flox::resolver::Lockfile::removeUnusedInputs | ( | ) |
Drop any registry.inputs
and registry.priority
members that are not explicitly declared in the manifest registry
or used by resolved packages.
|
private |
Raw representation of the lockfile.
|
private |
Handle for the manifest used to create the lockfile. This reads the lockfile's manifest
.
|
private |
Maps { <FINGERPRINT>: <INPUT> }
for all packages
members' inputs.