lib.packagesFromDirectoryRecursive: default to creating new scopes when newScope is provided

Co-authored-by: Rebecca Turner <rbt@sent.as>
This commit is contained in:
nicoo
2024-12-01 10:44:54 +00:00
committed by Paul Meyer
parent 41f219d1d9
commit 32235deeb8
2 changed files with 47 additions and 17 deletions

View File

@@ -2696,12 +2696,6 @@ runTests {
in {
expr = lib.filterAttrsRecursive (name: value: !lib.elem name [ "callPackage" "newScope" "overrideScope" "packages" ]) (packagesFromDirectoryRecursive {
inherit (emptyScope) callPackage newScope;
recurseIntoDirectory = f: { newScope, ... }@args:
recurseIntoAttrs (makeScope newScope (self:
f (args // {
inherit (self) callPackage newScope;
})
));
directory = ./packages-from-directory/scope;
});
expected = lib.recurseIntoAttrs {