summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-12-09 00:30:08 +0100
committertv <tv@krebsco.de>2022-12-09 01:34:31 +0100
commita0b92d1c55c7c95283c99cd9021dacbd5a1c59d0 (patch)
treef9de86d2553096b3ba18a3fe3f448402d155dc2e /lib
parent896d690725f6c01ceab04097c196b021b5ded639 (diff)
lib: add isNixDirEntry
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/default.nix b/lib/default.nix
index d65c891..ad3a78a 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 =