Archived
1
0
forked from rarias/bscpkgs

Add Intel oneAPI 2023 with compilation tests

This commit is contained in:
2023-03-03 18:18:51 +01:00
parent fd84af45f0
commit 115e9beb59
8 changed files with 378 additions and 56 deletions

View File

@@ -0,0 +1,36 @@
{ stdenv, writeText, which, strace }:
let
hello_cpp = writeText "hello.cpp" ''
#include <cstdio>
int main()
{
printf("Hello world!\n");
return 0;
}
'';
in
stdenv.mkDerivation rec {
version = "0.0.1";
name = "hello-cpp";
buildInputs = [ stdenv which strace ];
src = hello_cpp;
dontUnpack = true;
dontConfigure = true;
NIX_DEBUG = 0;
buildPhase = ''
cp $src hello.cpp
set -x
echo CXX=$CXX
which $CXX
$CXX hello.cpp -o hello
./hello
set +x
'';
installPhase = ''
touch $out
'';
}