eigenmath: enable tests

This commit is contained in:
Nick Cao 2023-04-08 23:19:59 +08:00
parent 16d7f06261
commit 027d18d6a7
No known key found for this signature in database

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, buildPackages
, unstableGitUpdater
}:
@ -15,12 +16,24 @@ stdenv.mkDerivation rec {
hash = "sha256-GZkC/Tvep7fL5nJyz0ZN7z0lUhGX4EJlXVswwAyegUE=";
};
checkPhase = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
runHook preCheck
for testcase in selftest1 selftest2; do
${emulator} ./eigenmath "test/$testcase"
done
runHook postCheck
'';
installPhase = ''
runHook preInstall
install -Dm555 eigenmath "$out/bin/eigenmath"
runHook postInstall
'';
doCheck = true;
passthru = {
updateScript = unstableGitUpdater { };
};