In the process of updating one of my home manager configurations to 24.11, I got an error about a package being marked as broken. It was something like python3.12-libarcus. Let me tell you, that isn’t listed in my configuration, and the stack trace didn’t help me…so what do you do?

I discovered a tool called nix-tree: https://github.com/utdemir/nix-tree

It will scan a nix store and allow you to interactively look at all packages and their dependency tree. I decided to look at my current profile with nix-tree ~/.nix-profile/ and look around. (note, I think there’s a better way to look at a configuration itself, not just a previous build.) The tool lets me search for dependencies, so I searched for python3.12-libarcus and it brought me to where it is in the tree…

I found the broken package! It was ultimaker cura, slicing software for 3d printers, which it turns out is very outdated in nixpkgs. There’s discussions on the github about just wrapping the appimage instead of building from source. In the meantime, I removed pkgs.cura from my dependencies and my build was successful!

What other methods or tricks do you have to navigating build errors, or understand the nix store or your configuration better?

  • balsoft@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    24 days ago

    What other methods or tricks do you have to navigating build errors

    TBH I typically just look through the stack trace (with --show-trace). It can take a while, but usually it leads me down the right path. (and let me tell you, today’s stack traces are a blessing compared to what we had just five-six years ago).