Question: any documentation categorizing impure versus pure builtins?

I discovered a gap in my mental model of nix today around builtins.
I wanted to reference builtins.currentSystem in a flake but could not.

Do we have documentation anywhere that categorizes which builtins are pure versus impure? I saw the nix manual notes that builtins.currentSystem is unavailable in pure mode.

As an aside, it looks like others have had a similar suprise/experience:

All Nix language functions are “pure” as in “work with pure-eval” except those listed in the pure-eval documentation. Although I just noticed that storePath is not listed. PR appreciated! Even more appreciated would be a adding parameter to register builtins as impure, then this list can be generated automatically.

3 Likes