Need another good example of using builtins.trace

I have seen it described, but have had no luck using Builtins.trace.

Is there a trick? Is there a piece of nix code (not a build expression) which I can import from nix repl and see how to do it?

1 Like

Solved it.

Good description at Nix by example | by James Fisher | Medium

2 Likes

There are some extractions available in lib.debug, you can also study their source to learn about how to use builtins.trace

https://github.com/NixOS/nixpkgs/blob/dfea4e4951a3cee4d1807d8d4590189cf16f366b/lib/debug.nix

5 Likes

Yup. Pretty helpful. Thank you