{ lib , stdenv , fetchFromGitHub , buildPackages , unstableGitUpdater }: stdenv.mkDerivation rec { pname = "eigenmath"; version = "unstable-2023-11-17"; src = fetchFromGitHub { owner = "georgeweigt"; repo = pname; rev = "b0d822f10243ad5b1c88efb5a82b43a0bbf1bfbc"; hash = "sha256-eJ/EmzV5UZGxwZNIna/XXkYY+vkLc610KcywBFPRfyM="; }; 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; }; }