You can also explore the tree of your system's derivations with nix-tree https://github.com/utdemir/nix-tree
For example, run nix-tree /nix/var/nix/profiles/system search for the package name with / and then explore the parents and descendants of that package...