This isn’t correct. The nix expression you’re citing is for the bootstrap JDK, i.e. the JDK that’s needed for the JDK to build itself. The JDK build process doesn’t need src.zip
in its bootstrap JDK, that’s all.
There is a src.zip
inside the actual JDK in the store:
$ file /nix/store/q2mivnykja644pzqvkfqllzqryia0y5n-openjdk-8u222-ga/lib/openjdk/src.zip
/nix/store/q2mivnykja644pzqvkfqllzqryia0y5n-openjdk-8u222-ga/lib/openjdk/src.zip: Zip archive data, at least v2.0 to extract
Further, I use this approach to ensure the jdk is always available at a fixed path. So I have:
$ ls -l /etc/jdk*/lib/openjdk/{,lib/}src.zip
-r--r--r-- 2 root root 65042839 Dec 31 1969 /etc/jdk12/lib/openjdk/lib/src.zip
-r--r--r-- 2 root root 52069750 Dec 31 1969 /etc/jdk8/lib/openjdk/src.zip
-r--r--r-- 2 root root 52069750 Dec 31 1969 /etc/jdk/lib/openjdk/src.zip