I was getting errors like...
$ ./gradlew build
... snip ...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':buildSearchableOptions'.
> A problem occurred starting process 'command '/home/rkb/.gradle/caches/modules-2/files-2.1/com.jetbrains/jbre/jbrx-8u202-linux-x64-b1483.49/jre/bin/java''
libfreetype.so.6: cannot open shared object file: No such file or directory
could not open terminal for stdout: could not get termcap entry
$ nix-shell default.nix
then gradle build
or whatever
https://github.com/r-k-b/intellij-elm/commit/829154f3c10a3953889b86216ba1dd3f79a2a153