fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
27 lines
533 B
Nix
27 lines
533 B
Nix
{
|
|
stdenv,
|
|
cmake,
|
|
inja,
|
|
lib,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "inja-simple-cmake-test";
|
|
src = lib.fileset.toSource {
|
|
root = ./.;
|
|
fileset = lib.fileset.unions [
|
|
./main.cpp
|
|
./CMakeLists.txt
|
|
];
|
|
};
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ inja ];
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
if [[ `$out/bin/simple-cmake-test` != "Hello world!" ]]; then
|
|
echo "ERROR: $out/bin/simple-cmake-test does not output 'Hello world!'"
|
|
exit 1
|
|
fi
|
|
'';
|
|
meta.timeout = 30;
|
|
}
|