From b1ea6b2d73707d52fbf151fd4235f1c2e501a03c Mon Sep 17 00:00:00 2001 From: Bouke van der Bijl Date: Wed, 1 Feb 2023 12:10:23 +0100 Subject: [PATCH] openmvs: add check and instalCheck --- .../science/misc/openmvs/default.nix | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/misc/openmvs/default.nix b/pkgs/applications/science/misc/openmvs/default.nix index 4e3f5a81881b..2ea25215e0e9 100644 --- a/pkgs/applications/science/misc/openmvs/default.nix +++ b/pkgs/applications/science/misc/openmvs/default.nix @@ -38,9 +38,7 @@ stdenv.mkDerivation rec { }; # SSE is enabled by default - cmakeFlags = [ - "-DOpenMVS_ENABLE_TESTS=OFF" - ] ++ lib.optional (!stdenv.isx86_64) "-DOpenMVS_USE_SSE=OFF"; + cmakeFlags = lib.optional (!stdenv.isx86_64) "-DOpenMVS_USE_SSE=OFF"; buildInputs = [ boostWithZstd @@ -61,9 +59,24 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; - postFixup = '' + postInstall = '' mv $out/bin/OpenMVS/* $out/bin rmdir $out/bin/OpenMVS + rm $out/bin/Tests + ''; + + doCheck = true; + checkPhase = '' + runHook preCheck + ctest + runHook postCheck + ''; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/TextureMesh -v + runHook postInstallCheck ''; meta = {