std icon indicating copy to clipboard operation
std copied to clipboard

Using lib.fileset with std cells

Open oneingan opened this issue 7 months ago • 2 comments

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.

oneingan avatar Jun 04 '25 12:06 oneingan