Thanks!
I guess it should be nix why-depends .nix-profile/bin nixpkgs#freeimage
but unfortunately that just spits out the "freeimage is insecure" error (for whatever reason? it's not like I'm installing the insecure package)
❱ nix why-depends .nix-profile/bin nixpkgs#freeimage
error: Package ‘freeimage-unstable-2021-11-01’ in /nix/store/dzv2jjx429kczqwqklfb8v4mn9phv778-source/pkgs/development/libraries/freeimage/default.nix:72 is marked as insecure, refusing to evaluate.
[...]
Neither NIXPKGS_ALLOW_INSECURE=1 nix why-depends ...
or nix why-depends --option permittedInsecurePackages freeimage-unstable-2021-11-01 ...
(which may very well be wrong) seem to bypass the overzealous security check... I ended up updating my working copy of the nixpkgs git repo and running grep -rl freeimage *
there.
The wayland project was originally started by George Soros... what did you expect?