forked from lix-project/lix
commit
33bd10549e
|
@ -146,7 +146,7 @@ std::shared_ptr<FlakeRegistry> getFlagRegistry()
|
||||||
return std::make_shared<FlakeRegistry>();
|
return std::make_shared<FlakeRegistry>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This always returns a vector with flakeRef, userReg, globalReg.
|
// This always returns a vector with flakeReg, userReg, globalReg.
|
||||||
// If one of them doesn't exist, the registry is left empty but does exist.
|
// If one of them doesn't exist, the registry is left empty but does exist.
|
||||||
const Registries EvalState::getFlakeRegistries()
|
const Registries EvalState::getFlakeRegistries()
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
static const size_t FLAG_REGISTRY = 0;
|
||||||
|
static const size_t USER_REGISTRY = 1;
|
||||||
|
static const size_t GLOBAL_REGISTRY = 2;
|
||||||
|
|
||||||
struct Value;
|
struct Value;
|
||||||
class EvalState;
|
class EvalState;
|
||||||
|
|
||||||
|
|
|
@ -30,13 +30,13 @@ struct CmdFlakeList : StoreCommand, MixEvalArgs
|
||||||
|
|
||||||
stopProgressBar();
|
stopProgressBar();
|
||||||
|
|
||||||
for (auto & entry : registries[0]->entries)
|
for (auto & entry : registries[FLAG_REGISTRY]->entries)
|
||||||
std::cout << entry.first.to_string() << " flags " << entry.second.to_string() << "\n";
|
std::cout << entry.first.to_string() << " flags " << entry.second.to_string() << "\n";
|
||||||
|
|
||||||
for (auto & entry : registries[1]->entries)
|
for (auto & entry : registries[USER_REGISTRY]->entries)
|
||||||
std::cout << entry.first.to_string() << " user " << entry.second.to_string() << "\n";
|
std::cout << entry.first.to_string() << " user " << entry.second.to_string() << "\n";
|
||||||
|
|
||||||
for (auto & entry : registries[2]->entries)
|
for (auto & entry : registries[GLOBAL_REGISTRY]->entries)
|
||||||
std::cout << entry.first.to_string() << " global " << entry.second.to_string() << "\n";
|
std::cout << entry.first.to_string() << " global " << entry.second.to_string() << "\n";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue