Globset: Source filtering using globs with filesets

Hi there! I am Edgar and I wanted to share with you globset, a Nix library to help specify what sources to include when building a Nix package using familiar glob patterns like “/.go”.

“globset” provides a concise and simple way of specifying what sources should be included. It is built on top of the new “fileset” library introduced in Nixpkgs 23.11, and is composable with any libraries using it. This is our second open source project after releasing nix-snapshotter last year.

See corresponding HackerNews discussion .

14 Likes

This is very cool! Do you think there is any chance this could get merged into Nix as a default lib feature?

Thanks! Since this introduces an opinionated DSL, I think it’s better left external. If it becomes popular, perhaps we can move it to nix-community.

1 Like