-self: super:
+_self: super:
with builtins;
let lib = super.lib; in
{
- lib = (super.lib or {}) // {
+ lib = (super.lib or { }) // {
loadFile = name: toFile (baseNameOf (toString name)) (readFile name);
findFiles = pattern:
- let go = curr:
- let dir = readDir curr; in
- let files = lib.filterAttrs (name: type:
- type == "regular" &&
- match pattern name != null) dir; in
- let dirs = lib.filterAttrs (name: type: type == "directory") dir; in
- map (name: "${curr}/${name}") (attrNames files) ++
- lib.concatMap (name: go "${curr}/${name}") (attrNames dirs)
+ let
+ go = curr:
+ let dir = readDir curr; in
+ let
+ files = lib.filterAttrs
+ (name: type:
+ type == "regular" &&
+ match pattern name != null)
+ dir;
+ in
+ let dirs = lib.filterAttrs (_name: type: type == "directory") dir; in
+ map (name: "${curr}/${name}") (attrNames files) ++
+ lib.concatMap (name: go "${curr}/${name}") (attrNames dirs)
;
- in go;
+ in
+ go;
};
}