New nix profile list UI

Also includes a compatibility hack for Home Manager
This commit is contained in:
Max Headroom 2022-08-03 20:17:37 +02:00
parent 16eae95adf
commit b4c2191838

View file

@ -542,9 +542,13 @@ struct CmdProfileList : virtual EvalCommand, virtual StoreCommand, MixDefaultPro
for (size_t i = 0; i < manifest.elements.size(); ++i) { for (size_t i = 0; i < manifest.elements.size(); ++i) {
auto & element(manifest.elements[i]); auto & element(manifest.elements[i]);
logger->cout("%03d %s\t%s", i, if (element.source) {
element.source ? element.source->originalRef.to_string() + "#" + element.source->attrPath + printOutputsSpec(element.source->outputs) : "-", logger->cout("%03d:\n\tInstallable: %s\n\tStore paths: %s", i,
concatStringsSep(" ", store->printStorePathSet(element.storePaths))); element.source ? element.source->originalRef.to_string() + "#" + element.source->attrPath + printOutputsSpec(element.source->outputs) : "-",
concatStringsSep(" ", store->printStorePathSet(element.storePaths)));
} else {
logger->cout("%03d - - %s", i, concatStringsSep(" ", store->printStorePathSet(element.storePaths)));
}
} }
} }
}; };