"Mbed TLS 2 is not maintained anymore." - How do I trace which package requires it?

I just did a nix flake update one one of my machines and I’m getting this error:

“Mbed TLS 2 is not maintained anymore”.

The problem is, it’s not something I’ve explicitly installed so fixing the issue requires understanding which package I’ve installed is using this unmaintained package. How can I do that without just trial and error?

The most straightforward solution is using nix why-depends.

Personally, I prefer using nix-tree and doing a search via Ctrl + /.

You question is likely related to the current breakage of Lutris, which pull sin mbedtls_2. This has been been fixed on unstable and 25.05, channel updates are under way: Making sure you're not a bot!

why-depends won’t work for eval errors.

OP can try

nixos-rebuild build --show-trace |& grep 'while evaluating derivation'

to see the chain of dependencies.