Skip to content

Commit

Permalink
lib.packagesFromDirectoryRecursive: document that symlinks are ignored
Browse files Browse the repository at this point in the history
This was implicit in the previous “other files are ignored.”
  • Loading branch information
nbraud committed Jan 12, 2025
1 parent 8e448ee commit b3977a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/filesystem.nix
Original file line number Diff line number Diff line change
Expand Up @@ -290,18 +290,19 @@ in
`callPackage <directory>/package.nix { }` is returned.
- Otherwise, the input directory's contents are listed and transformed into
an attribute set.
- If a file name has the `.nix` extension, it is turned into attribute
- If a regular file's name has the `.nix` extension, it is turned into attribute
where:
- The attribute name is the file name without the `.nix` extension
- The attribute value is `callPackage <file path> { }`
- Other files are ignored.
- Directories are turned into an attribute where:
- The attribute name is the name of the directory
- The attribute value is the result of calling
`packagesFromDirectoryRecursive { ... }` on the directory.
As a result, directories with no `.nix` files (including empty
directories) will be transformed into empty attribute sets.
- Other files are ignored, including symbolic links to directories and to regular `.nix`
files; this is because nixlang code cannot distinguish the type of a link's target.
# Type
Expand Down

0 comments on commit b3977a7

Please sign in to comment.