mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 14:36:16 +02:00
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);
|
auto emptyArgs = state.allocBindings(0);
|
||||||
|
|
||||||
// As a convenience, look for the attribute in
|
|
||||||
// 'provides.packages'.
|
|
||||||
if (searchPackages) {
|
if (searchPackages) {
|
||||||
|
// As a convenience, look for the attribute in
|
||||||
|
// 'provides.packages'.
|
||||||
if (auto aPackages = *vProvides->attrs->get(state.symbols.create("packages"))) {
|
if (auto aPackages = *vProvides->attrs->get(state.symbols.create("packages"))) {
|
||||||
try {
|
try {
|
||||||
auto * v = findAlongAttrPath(state, *attrPaths.begin(), *emptyArgs, *aPackages->value);
|
auto * v = findAlongAttrPath(state, *attrPaths.begin(), *emptyArgs, *aPackages->value);
|
||||||
|
@ -247,6 +247,17 @@ struct InstallableFlake : InstallableValue
|
||||||
} catch (AttrPathNotFound & e) {
|
} 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'.
|
// Otherwise, look for it in 'provides'.
|
||||||
|
|
Loading…
Reference in a new issue