Move test inside pkgs/

This commit is contained in:
2025-03-04 18:00:04 +01:00
parent e47b8f4afb
commit 3d10f3a568
20 changed files with 0 additions and 0 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
'';
}