Man, I feel really silly now.
I added the additional package I needed to extraPackages as @cdepillabout said to, and then I removed the file ~/.ghc/x86_64-linux-8.8.2/environments/default, which was the package database which GHC was using, and now it works when I run /run/current-system/sw/bin/xmonad --recompile.
For some reason xmonad is pointing to ~/.nix-profile/bin/xmonad instead, but I think that just some leftover of a mess I must have made with nix-env while trying to get this to work. So I just need to fix that, and I’ll be settled. But I think I can figure that one out on my own.
Thanks a lot for the help!