std
std copied to clipboard
Using lib.fileset with std cells
I'd like to explore using nixpkgs.lib.fileset for defining src and similar fields in derivations built with std, instead of the existing incl helper.
fileset offers more composable primitives (union, intersection, etc.) and aligns well with idiomatic Nix patterns. However, a limitation I've hit is that within a cell, accessing inputs.self or other flake inputs yields store paths — making them incompatible with fileset expectations.
Is there a recommended way to define fileset-based sources in this setup, especially across cells? Would using a different reference to the repo root, or some indirection, be more appropriate?
Thanks in advance for any guidance or prior art.