Skip to content

lib.fileset: support fileFilter for file sets#411409

Closed
wolfgangwalther wants to merge 2 commits intoNixOS:masterfrom
wolfgangwalther:lib-fileset-virtual
Closed

lib.fileset: support fileFilter for file sets#411409
wolfgangwalther wants to merge 2 commits intoNixOS:masterfrom
wolfgangwalther:lib-fileset-virtual

Conversation

@wolfgangwalther
Copy link
Contributor

@wolfgangwalther wolfgangwalther commented May 27, 2025

Not supporting file sets for fileFilter was a conscious decision when the function was introduced. The only argument in favor of that decision was future extensibility for predicate properties like subpath or components. Since those operate on the full path, not only on the filename, we could introduce a new function pathFilter in the future, which supports only paths, but also path-based filtering. Thus, the door is not closed for that extension.

Things done


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: lib The Nixpkgs function library 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 27, 2025
@wolfgangwalther

This comment was marked as outdated.

@infinisil

This comment was marked as outdated.

@wolfgangwalther

This comment was marked as outdated.

@wolfgangwalther

This comment was marked as outdated.

@wolfgangwalther

This comment was marked as outdated.

@wolfgangwalther

This comment was marked as outdated.

@wolfgangwalther wolfgangwalther changed the title lib.fileset: support fileFilter for file sets & introduce virtual files lib.fileset: support fileFilter for file sets Nov 5, 2025
@wolfgangwalther
Copy link
Contributor Author

I removed the "virtual files" part of this and reduced it to only support fileFilter for file sets. I think this is a useful addition to have and there should not be conceptual blockers.

@wolfgangwalther wolfgangwalther requested review from hsjobeki and infinisil and removed request for hsjobeki and infinisil November 5, 2025 12:02
Not supporting file sets for fileFilter was a conscious decision when
the function was introduced. The only argument in favor of that decision
was future extensibility for predicate properties like `subpath` or
`components`. Since those operate on the full path, not only on the
filename, we could introduce a new function `pathFilter` in the future,
which supports only paths, but also path-based filtering. Thus, the door
is not closed for that extension.
@wolfgangwalther wolfgangwalther marked this pull request as ready for review November 5, 2025 12:03
@wolfgangwalther
Copy link
Contributor Author

There seems to be no interest in this.

@wolfgangwalther wolfgangwalther deleted the lib-fileset-virtual branch November 21, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: lib The Nixpkgs function library 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants