Nix Language | 1869 Members | |
| Nix programming language | 343 Servers |
| Sender | Message | Time |
|---|---|---|
| 14 Mar 2026 | ||
| 10:37:11 | ||
| 11:08:09 | ||
| 14:31:24 | ||
| 16:37:07 | ||
| 18:49:53 | ||
| 19:19:54 | ||
| 19:28:14 | ||
| 21:21:31 | ||
| 21:22:01 | ||
| 15 Mar 2026 | ||
| 07:24:32 | ||
| I'm looking for some debugging possibilities... When I run (In this particular case, it's a package that ended up in a nixos vm disk image that I want to track down) Is it possible to trace back where in my *.nix files the derivation comes from, and the call stack to get there? I have no trouble finding the inputs for the derivation itself, but not what the inputs comes from. | 07:50:42 | |
| * I'm looking for some debugging possibilities... When I run (In this particular case, it's a package that ended up in a nixos vm disk image that I want to track down, but that's just an example) Is it possible to trace back where in my *.nix files the derivation comes from, and the call stack to get there? I have no trouble finding the inputs for the derivation itself, but not what the inputs comes from. | 07:50:52 | |
| 07:52:15 | ||
You can some something like nix-store -q --tree /nix/store/hash-whatever.drv to get a tree of dependencies, almost like a call stack. | 16:44:11 | |
| 17:34:27 | ||
| Thanks for the reply, That is for sure also helpful, but not really what I'm searching for. That focuses on what derivations depends on what other derivations. Not really what expressions that leads up to a derivation. Imagine I have a derivation, created by a function: integrate_modules.nix:
Then I use it from something modular, that packs modules from different sources:
Or something similar. In this the case above, it's the nixos configuration, which has packages, which depends on packages depending on configuration. In some other case, I may have built the rules myself, but it can quickly start getting messy to see where every parameter comes from. So in the second example, the derivation will show what parameters the varaible So I'm looking for some way to debug the nix expressions internally. The closest I've seen is So thinking if there is some kind of debugger, where it's possible to set breakpoints and print the stack for example, or something else similar | 18:07:06 | |
| * Thanks for the reply, Not really what I'm searching for though, it seems. Looks great for tracking the dependencies between derivations. I'm looking for the understanding what nix functions are called that leads up to a given derivation. Many derivations are written as generic templates, with configurations. I want to be able to see what configuration flags are set for some derivations, so I know what to change. Something similar to a debugger | 18:11:32 | |
| The question is more about the tooling, since I've ended up with the same issue earlier. But in the particular case above is that I'm trying to build nixos for a minimal embedded setup. And I've found that Closest I've found is to add | 18:22:27 | |
I think what I'm looking for is nix repl --debugger, but being able to add breakpoints manually from command line. Is that possible? | 18:28:57 | |
| Unfortunately, I don't think a thorough debugging implementation exists for nix yet, I do know that lix provides better error logs but that's not what you are looking for. It may be possible use the repl, import your nix files and and then inspect it like that but its harder to use. | 19:31:54 | |
| 19:32:12 | ||
In reply to @pengipengi:matrix.orgNo it is currently not, which is why the current REPL debugger is frankly useless. But it's on my radar, so please be (very) patient :) | 20:21:35 | |
| 20:33:49 | ||
| 20:56:28 | ||
| 16 Mar 2026 | ||
| Aha, I see 🙂 thanks, then I stop searching, and tries to solve the issue with the tools at hand. No worries 🙂 | 04:19:05 | |
| 05:54:44 | ||
| 05:55:34 | ||
| 17 Mar 2026 | ||
| 06:31:37 | ||
| 06:32:33 | ||
| 08:10:33 | ||