forked from rarias/bscpkgs
Add Intel oneAPI 2023 with compilation tests
This commit is contained in:
35
test/compilers/hello-f.nix
Normal file
35
test/compilers/hello-f.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ stdenv, writeText, which, strace }:
|
||||
|
||||
let
|
||||
hello_f90 = writeText "hello.f90" ''
|
||||
program hello
|
||||
print *, 'Hello, World!'
|
||||
end program hello
|
||||
'';
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.0.1";
|
||||
name = "hello-f90";
|
||||
buildInputs = [ stdenv which strace ];
|
||||
src = hello_f90;
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
NIX_DEBUG = 0;
|
||||
buildPhase = ''
|
||||
set -x
|
||||
echo FC=$FC
|
||||
which $FC
|
||||
$FC -v
|
||||
|
||||
cp ${hello_f90} hello.f90
|
||||
$FC hello.f90 -o hello
|
||||
./hello
|
||||
|
||||
set +x
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
touch $out
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user