#pragma once #include "types.hh" namespace nix { class Store; } namespace nix::fetchers { struct Input; struct Registry { enum RegistryType { Flag = 0, User = 1, Global = 2, }; RegistryType type; std::vector, std::shared_ptr>> entries; Registry(RegistryType type) : type(type) { } static std::shared_ptr read( const Path & path, RegistryType type); void write(const Path & path); void add( const std::shared_ptr & from, const std::shared_ptr & to); void remove(const std::shared_ptr & input); }; typedef std::vector> Registries; std::shared_ptr getUserRegistry(); Path getUserRegistryPath(); Registries getRegistries(ref store); void overrideRegistry( const std::shared_ptr & from, const std::shared_ptr & to); std::shared_ptr lookupInRegistries( ref store, std::shared_ptr input); }