lib: add isNixDirEntry

This commit is contained in:
tv 2022-12-09 00:30:08 +01:00
parent eb3285feea
commit e6863fe8c6
1 changed files with 5 additions and 5 deletions

View File

@ -96,11 +96,11 @@ let
in
nameValuePair (toPackageName name) (f path))
(attrNames
(filterAttrs
(name: type:
(type == "regular" && hasSuffix ".nix" name && name != "default.nix") ||
(type == "directory" && !hasPrefix "." name))
(readDir dirPath))));
(filterAttrs isNixDirEntry (readDir dirPath))));
isNixDirEntry = name: type:
(type == "regular" && hasSuffix ".nix" name && name != "default.nix") ||
(type == "directory" && !hasPrefix "." name);
# https://tools.ietf.org/html/rfc5952
normalize-ip6-addr =