depot/third_party/nixpkgs/pkgs/by-name/in/inja/simple-cmake-test/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

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;
}