summaryrefslogtreecommitdiff
path: root/lib/fileset/default.nix
diff options
context:
space:
mode:
authorSilvan Mosberger <silvan.mosberger@tweag.io>2023-09-13 22:26:16 +0200
committerSilvan Mosberger <silvan.mosberger@tweag.io>2023-09-13 23:32:14 +0200
commit7d4eb3f1b7c74b3812c1873b6136a18387310bb8 (patch)
tree972ba50954d3dfc893d31b0fa8c6a2c6bcf31351 /lib/fileset/default.nix
parentlib.fileset: Internal representation v1 (diff)
downloadnixpkgs-7d4eb3f1b7c74b3812c1873b6136a18387310bb8.tar.gz
lib.fileset.toSource: Evaluate fileset even for empty directories
Diffstat (limited to 'lib/fileset/default.nix')
-rw-r--r--lib/fileset/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fileset/default.nix b/lib/fileset/default.nix
index b30125265520..51002332a319 100644
--- a/lib/fileset/default.nix
+++ b/lib/fileset/default.nix
@@ -92,6 +92,7 @@ The only way to change which files get added to the store is by changing the `fi
fileset = _coerce "lib.fileset.toSource: `fileset`" filesetPath;
rootFilesystemRoot = (splitRoot root).root;
filesetFilesystemRoot = (splitRoot fileset._internalBase).root;
+ filter = _toSourceFilter fileset;
in
if ! isPath root then
if isStringLike root then
@@ -123,9 +124,10 @@ The only way to change which files get added to the store is by changing the `fi
- Set `root` to ${toString fileset._internalBase} or any directory higher up. This changes the layout of the resulting store path.
- Set `fileset` to a file set that cannot contain files outside the `root` ${toString root}. This could change the files included in the result.''
else
+ builtins.seq filter
cleanSourceWith {
name = "source";
src = root;
- filter = _toSourceFilter fileset;
+ inherit filter;
};
}