Creating development environments for IDE's by overriding their user environment

When using IDE’s, is it a viable option to install programming languages into their user environment using package overrides?
I.e. if I wanted to use IntelliJ to develop scala programs, could I just install the required build-tools into its environment, i.e.:

jetbrains.idea-community.overrideAttrs (old: {
  propagatedUserEnvPkgs = [ pkgs.scala pkgs.sbt ]; # not sure if this is the right variable, could just makeWrapper instead. 
});

If so, can I somehow prevent nix from rebuilding the whole package? Theoretically it only needs to make a change to the user environment afterwards, right? Or are there any better options to do this?

Perhaps just using wrapProgram to put the build tools into PATH would work.

Can I ask why would you want to do it like this? I don’t know much about Scala, but in general I install programming languages, and whatever else is required, for each project. That way I can remain oblivious to which version of which language is used by each respective project, because the Nix shell that is spawned automatically by Direnv manages that. I then either launch my editor from inside that directory, nvim . or, in the case of Intellij products, they typically remember the path to compilers and store it in the .idea folder. Of course, if I update the language I need to update the settings in Intellij but that shouldn’t happen too often.

Personally, there are some languages that I use so universally (nix, shell) while using my computer, that I’d like their tools to always be available.

I just place those in my system packages currently, but it seems reasonable to not want to clutter your user env with IDE-only binaries.