chore(flake): rename lib
-> helpers
Prevents name clashing with `nixpkgs.lib`
This commit is contained in:
parent
177babd497
commit
e8e005029d
2 changed files with 2 additions and 4 deletions
|
@ -1,36 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mapAttrs;
|
||||
inherit (lib.attrsets) filterAttrs;
|
||||
in
|
||||
rec {
|
||||
recurseDir = dir:
|
||||
mapAttrs
|
||||
(file: type:
|
||||
if type == "directory"
|
||||
then recurseDir "${dir}/${file}"
|
||||
else type
|
||||
)
|
||||
(builtins.readDir dir);
|
||||
|
||||
# VVV - Implying `attrs` is the output of `recurseDir` - VVV
|
||||
|
||||
hasFiles = files: attrs:
|
||||
builtins.all
|
||||
(b: b)
|
||||
(builtins.map
|
||||
(file:
|
||||
builtins.hasAttr file attrs &&
|
||||
builtins.getAttr file attrs == "regular")
|
||||
files);
|
||||
|
||||
hasDirectories = directories: attrs:
|
||||
builtins.all
|
||||
(b: b)
|
||||
(builtins.map
|
||||
(directory:
|
||||
builtins.hasAttr directory attrs &&
|
||||
builtins.getAttr directory attrs == "set")
|
||||
directories);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue