diff options
author | lassulus <lassulus@lassul.us> | 2022-12-12 16:45:39 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-12-12 16:45:39 +0100 |
commit | 4888137a5af2a664a6c2177a2d4edadd7c0b9007 (patch) | |
tree | 679b6153f2252d80104183674513ab293fb8eb8b /lib/default.nix | |
parent | 53a1daa4f282c5df91e3d73b215a1ed01afc312e (diff) | |
parent | 85a3bb5d299785b8eff38390683f3c9f3fa73e3c (diff) |
Merge remote-tracking branch 'ni/master'
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 7c3b037..149b97a 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; } |