Fortran: Difference between revisions
Simplify setup, add example flake |
m Add category languages |
||
Line 1: | Line 1: | ||
The Fortran front-end for gcc can be enabled by adding <code>pkgs.gfortran</code> to {{Nixos:option|environment.systemPackages}}. | The Fortran front-end for gcc can be enabled by adding <code>pkgs.gfortran</code> to {{Nixos:option|environment.systemPackages}}. | ||
If both <code>gcc</code> and <code>gfortran</code> are included, the build may fail with an error of the form: | If both <code>gcc</code> and <code>gfortran</code> are included, the build may fail with an error of the form: <code>collision between gfortran-wrapper/bin/gcc and gcc-wrapper/bin/gcc</code>. | ||
An example [[Flakes|nix flake]]: | An example [[Flakes|nix flake]]: | ||
Line 23: | Line 23: | ||
Run <code>nix develop</code> to enter the nix shell, then compile with <code>gfortran myfile.f</code>. | Run <code>nix develop</code> to enter the nix shell, then compile with <code>gfortran myfile.f</code>. | ||
[[Category:Languages]] |