{ lib , stdenv , fetchFromGitHub , buildPackages , unstableGitUpdater }: stdenv.mkDerivation rec { pname = "eigenmath"; version = "3.26-unstable-2024-06-09"; src = fetchFromGitHub { owner = "georgeweigt"; repo = pname; rev = "285fc0133f0e7bb5e1e220b75246ce542ae50269"; hash = "sha256-ddED3PaHSSupe/QqMYj88GCmh9IrRvpAd4/WEpRTN00="; }; 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"; mainProgram = "eigenmath"; homepage = "https://georgeweigt.github.io"; license = licenses.bsd2; maintainers = with maintainers; [ nickcao ]; platforms = platforms.unix; }; }