mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
add piston nix pkg for gcc-fortran
This commit is contained in:
parent
11882b2085
commit
3fac94b683
11 changed files with 40 additions and 108 deletions
|
@ -48,4 +48,5 @@ args: {
|
|||
"gcc-c" = import ./gcc-c.nix args;
|
||||
"gcc-c++" = import ./gcc-c++.nix args;
|
||||
"gcc-d" = import ./gcc-d.nix args;
|
||||
"gcc-fortran" = import ./gcc-fortran.nix args;
|
||||
}
|
||||
|
|
39
runtimes/gcc-fortran.nix
Normal file
39
runtimes/gcc-fortran.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
pkg = pkgs.gfortran;
|
||||
in piston.mkRuntime {
|
||||
language = "fortran";
|
||||
version = pkg.version;
|
||||
runtime = "gcc";
|
||||
|
||||
aliases = [
|
||||
"gfortran"
|
||||
"f90"
|
||||
];
|
||||
|
||||
compile = ''
|
||||
rename 's/.code$/\.f90/' "$@" # Add .f90 extension
|
||||
${pkg}/bin/gfortran *.f90
|
||||
'';
|
||||
|
||||
run = ''
|
||||
shift
|
||||
./a.out "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.f90" = ''
|
||||
program test
|
||||
print "(a)", 'OK'
|
||||
end program test
|
||||
'';
|
||||
};
|
||||
args = [];
|
||||
stdin = "";
|
||||
packages = [];
|
||||
main = "test.f90";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue