diff options
Diffstat (limited to 'lib/default.nix')
-rw-r--r-- | lib/default.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/default.nix b/lib/default.nix index 7c3b0370e..149b97a72 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -95,9 +95,12 @@ let path = dirPath + "/${relPath}"; in nameValuePair (toPackageName name) (f path)) - (filter - (name: name != "default.nix" && !hasPrefix "." name) - (attrNames (readDir dirPath)))); + (attrNames + (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 = @@ -191,3 +194,4 @@ let in lib +// { inherit lib; } |