We can use use `stdenv.hostPlatform.isStatic` instead, and move the
logic per package. The least opionated benefit of this is that it makes
it much easier to replace packages with modified ones, as there is no
longer any issue of overlay order.
CC @FRidh @matthewbauer
The following changes are made to the derivation besides the version
bump:
- Move all buildInputs to nativeBuildInputs.
- Switch from Python 2 to Python 3.
- Build a dynamic library by default.
- Use gfortran version corresponding to gcc version.
- Enable parallel building.