{ lib, newScope }: let dirToAttrs = import ../lib/dirToAttrs.nix { inherit lib; }; in lib.makeScope newScope ( self: dirToAttrs ./. [ ( path: fname: _: if fname == "default.nix" then null else lib.strings.removeSuffix ".nix" fname ) ] ( name: fpath: typ: if typ == "regular" then self.callPackage fpath { } else if typ == "directory" && builtins.pathExists (fpath + "/package.nix") then self.callPackage (fpath + "/package.nix") { } else null ) )