54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
buildPackages,
|
|
unstableGitUpdater,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "eigenmath";
|
|
version = "3.33-unstable-2024-11-22";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "georgeweigt";
|
|
repo = pname;
|
|
rev = "2b68af098c0ae53ce3e1dda2d397f383e5418b34";
|
|
hash = "sha256-YnSNXlH8l8+2WeoiLpPuzepv/Mtxa1ltGpgcln+Emgw=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|