nixpkgs/pkgs/by-name/in/inja/simple-cmake-test/default.nix
Sergei Zimmerman 14800786a9
inja: init at 3.4.0 (#312868)
Includes a packaging test with a simple cmake project.
2024-05-22 22:28:43 +00:00

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