2023-03-08 16:32:21 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-04-12 12:48:02 +00:00
|
|
|
, buildPackages
|
|
|
|
, unstableGitUpdater
|
2023-03-08 16:32:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "eigenmath";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "unstable-2023-06-16";
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "georgeweigt";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "800adc5c0bd654eb9ad28497e1b78c4061b3a4cb";
|
|
|
|
hash = "sha256-/ViU44E3myAc7B8amm/TaIh70g2Z7IC4KRRG3++nOKs=";
|
2023-03-08 16:32:21 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
checkPhase = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
for testcase in selftest1 selftest2; do
|
|
|
|
${emulator} ./eigenmath "test/$testcase"
|
|
|
|
done
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm555 eigenmath "$out/bin/eigenmath"
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = unstableGitUpdater { };
|
|
|
|
};
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
meta = with lib;{
|
|
|
|
description = "Computer algebra system written in C";
|
|
|
|
homepage = "https://georgeweigt.github.io";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
|
|
|
}
|