Need JRE as a dependency for CPLEX package

I need to install CPLEX to compile a project. There is a CPLEX package (the package still needs the binary installer, because its propitiatory software, which is fine for me. I got it on my system). After some fiddling I got so far, to set the environment-variable NIXPKGS_ALLOW_UNFREE=1 and added cplex.releasePath = <path to my installer> to ~/.config/nixpkgs/config.nix. But when I then run nix-shell -p jre cplex I get the error:

nix-shell -p jre cplex          
this derivation will be built:
  /nix/store/5vh1963xxg4zq47226blhwrd2vag78l3-cplex-128.drv
building '/nix/store/5vh1963xxg4zq47226blhwrd2vag78l3-cplex-128.drv'...
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
JRE libraries are missing or not compatible....
Exiting....
Running phase: glibPreInstallPhase
Running phase: installPhase
Running phase: dropIconThemeCache
Running phase: glibPreFixupPhase
Running phase: fixupPhase
patchelf: getting info about '/nix/store/xf2nv3chig5wnlch7an1j88ljrkhsz8v-cplex-128/opl/bin/x86-64_linux/oplrun': No such file or directory
error: builder for '/nix/store/5vh1963xxg4zq47226blhwrd2vag78l3-cplex-128.drv' failed with exit code 1;
       last 10 log lines:
       > no configure script, doing nothing
       > Running phase: buildPhase
       > JRE libraries are missing or not compatible....
       > Exiting....
       > Running phase: glibPreInstallPhase
       > Running phase: installPhase
       > Running phase: dropIconThemeCache
       > Running phase: glibPreFixupPhase
       > Running phase: fixupPhase
       > patchelf: getting info about '/nix/store/xf2nv3chig5wnlch7an1j88ljrkhsz8v-cplex-128/opl/bin/x86-64_linux/oplrun': No such file or directory
       For full logs, run 'nix-store -l /nix/store/5vh1963xxg4zq47226blhwrd2vag78l3-cplex-128.drv'.

I guess that I have to install JRE in order to install CPLEX, but that apparently didn’t work. I am new to nix, so please look over my ignorance.
How can I fix the missing JRE in order to install CPLEX?

I first want to test if I can get cplex running in a nix-shell and then provide a shell.nix file in my repository. But I already struggle with getting it working in a nix-shell.