Skip to content

Using lib.fileset with std cells #403

@oneingan

Description

@oneingan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions