diff options
Diffstat (limited to 'src/libstore/fetchers/registry.hh')
-rw-r--r-- | src/libstore/fetchers/registry.hh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/libstore/fetchers/registry.hh b/src/libstore/fetchers/registry.hh index e29f78486..6063f51d6 100644 --- a/src/libstore/fetchers/registry.hh +++ b/src/libstore/fetchers/registry.hh @@ -1,13 +1,12 @@ #pragma once #include "types.hh" +#include "fetchers.hh" namespace nix { class Store; } namespace nix::fetchers { -struct Input; - struct Registry { enum RegistryType { @@ -18,7 +17,13 @@ struct Registry RegistryType type; - std::vector<std::pair<std::shared_ptr<const Input>, std::shared_ptr<const Input>>> entries; + std::vector< + std::tuple< + std::shared_ptr<const Input>, // from + std::shared_ptr<const Input>, // to + Input::Attrs // extra attributes + > + > entries; Registry(RegistryType type) : type(type) @@ -31,7 +36,8 @@ struct Registry void add( const std::shared_ptr<const Input> & from, - const std::shared_ptr<const Input> & to); + const std::shared_ptr<const Input> & to, + const Input::Attrs & extraAttrs); void remove(const std::shared_ptr<const Input> & input); }; @@ -46,9 +52,10 @@ Registries getRegistries(ref<Store> store); void overrideRegistry( const std::shared_ptr<const Input> & from, - const std::shared_ptr<const Input> & to); + const std::shared_ptr<const Input> & to, + const Input::Attrs & extraAttrs); -std::shared_ptr<const Input> lookupInRegistries( +std::pair<std::shared_ptr<const Input>, Input::Attrs> lookupInRegistries( ref<Store> store, std::shared_ptr<const Input> input); |