{ lib , stdenv , fetchFromGitHub , buildPackages , unstableGitUpdater }: stdenv.mkDerivation rec { pname = "eigenmath"; version = "unstable-2024-02-25"; src = fetchFromGitHub { owner = "georgeweigt"; repo = pname; rev = "4391a5bfe22d095cdf9fc12f376f64a8ffccccd9"; hash = "sha256-p+dnu35HGX8SgVpq5NczoZVehzfcuN+uucGurT7lWYM="; }; 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 { }; }; meta = with lib;{ description = "Computer algebra system written in C"; homepage = "https://georgeweigt.github.io"; license = licenses.bsd2; maintainers = with maintainers; [ nickcao ]; platforms = platforms.unix; }; }