Create a package description with all configurations resolved.
This function takes a GenericPackageDescription and several environment
parameters and tries to generate PackageDescription by finding a flag
assignment that result in satisfiable dependencies.
It takes as inputs a not necessarily complete specifications of flags
assignments, an optional package index as well as platform parameters. If
some flags are not assigned explicitly, this function will try to pick an
assignment that causes this function to succeed. The package index is
optional since on some platforms we cannot determine which packages have
been installed before. When no package index is supplied, every dependency
is assumed to be satisfiable, therefore all not explicitly assigned flags
will get their default values.
This function will fail if it cannot find a flag assignment that leads to
satisfiable dependencies. (It will not try alternative assignments for
explicitly specified flags.) In case of failure it will return a minimum
number of dependencies that could not be satisfied. On success, it will
return the package description and the full flag assignment chosen.