forked from lix-project/lix
Hack: Use legacyPackages from Nixpkgs
Nixpkgs doesn't provide a clean "packages" set yet, so until that's the case, look for packages in "legacyPackages" as well.
This commit is contained in:
parent
b70fc8f30c
commit
3488fa7c6c
1 changed files with 13 additions and 2 deletions
|
@ -236,9 +236,9 @@ struct InstallableFlake : InstallableValue
|
|||
|
||||
auto emptyArgs = state.allocBindings(0);
|
||||
|
||||
// As a convenience, look for the attribute in
|
||||
// 'provides.packages'.
|
||||
if (searchPackages) {
|
||||
// As a convenience, look for the attribute in
|
||||
// 'provides.packages'.
|
||||
if (auto aPackages = *vProvides->attrs->get(state.symbols.create("packages"))) {
|
||||
try {
|
||||
auto * v = findAlongAttrPath(state, *attrPaths.begin(), *emptyArgs, *aPackages->value);
|
||||
|
@ -247,6 +247,17 @@ struct InstallableFlake : InstallableValue
|
|||
} catch (AttrPathNotFound & e) {
|
||||
}
|
||||
}
|
||||
|
||||
// As a temporary hack until Nixpkgs is properly converted
|
||||
// to provide a clean 'packages' set, look in 'legacyPackages'.
|
||||
if (auto aPackages = *vProvides->attrs->get(state.symbols.create("legacyPackages"))) {
|
||||
try {
|
||||
auto * v = findAlongAttrPath(state, *attrPaths.begin(), *emptyArgs, *aPackages->value);
|
||||
state.forceValue(*v);
|
||||
return v;
|
||||
} catch (AttrPathNotFound & e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Otherwise, look for it in 'provides'.
|
||||
|
|
Loading…
Reference in a new issue