diff options
Diffstat (limited to 'src/nix/search.cc')
-rw-r--r-- | src/nix/search.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nix/search.cc b/src/nix/search.cc index 586bff5e5..fca49350a 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -165,6 +165,12 @@ struct CmdSearch : InstallableCommand, MixJSON || (attrPath[0] == "packages" && attrPath.size() <= 2)) recurse(); + else if (attrPath[0] == "legacyPackages" && attrPath.size() > 2) { + auto attr = cursor.maybeGetAttr(state->sRecurseForDerivations); + if (attr && attr->getBool()) + recurse(); + } + } catch (EvalError & e) { if (!(attrPath.size() > 0 && attrPath[0] == "legacyPackages")) throw; |