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:
+13
-2
@@ -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'.
|
||||
|
||||
Reference in New Issue
Block a user