Is there any progress on this?
I am experiencing the same problem. This is on a Ubuntu 14.04 machine, but I use gradle installed from the current nixos packages.
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
$ gradle -version
------------------------------------------------------------
Gradle 2.8
------------------------------------------------------------
Build time: 2015-10-20 03:46:36 UTC
Build number: none
Revision: b463d7980c40d44c4657dc80025275b84a29e31f
Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_76 (Oracle Corporation 25.76-b00)
OS: Linux 3.18.1-tf1-ll amd64
$ nix-env --version
nix-env (Nix) 1.10