From e6863fe8c68ff3ad704b1eef4b71fb4870b83bdf Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 00:30:08 +0100 Subject: lib: add isNixDirEntry --- lib/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/default.nix b/lib/default.nix index d65c891a3..ad3a78a04 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -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 = -- cgit v1.2.3