buildFHSUserEnv, Intellij and Gradle builds


In Nix 21.05 I had setup a development nix script where I ran Intellij (jetbrains.idea-community) in a buildFHSUserEnv environment. I had done this, as the project I work on download binaries as part of a Gradle build and those binaries expected a FHS environment. Yeah, I know, not best practice downloading binaries as part of a build, but it is nothing I can change.

I used the following:

nixosIdeaCommunity = buildFHSUserEnv {
    name = "idea-community";
    targetPkgs = pkgs: [ ];
    multiPkgs = pkgs: [ jetbrains.idea-community ];
    runScript = "idea-community $*";
mkShell {
  buildInputs = [

and everything worked great.

Then I upgraded to 21.11 and ran the same setup. IntelliJ startet and it seemed fine until I started the Gradle build from within IntelliJ and it failed.

The Gradle menu loads as it should, but whenever I build it fails. The IntelliJ GUI do not say why it fails, just that it did fail.

When I start IntelliJ without a FHS environment it works, except for the third party binaries mentioned in the start of the message.

I have looked at the console output from IntelliJ, and it has errors, but the errors are the same between the FHS and non-FHS builds.

I am stuck, and do not know how to proceed. I realize that I do not provide much in term of debugging output, but I do not know how to get any valuable output.

Best regards,