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-05-24 13:37:59 +00:00
|
|
|
version = "unstable-2023-05-12";
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "georgeweigt";
|
|
|
|
repo = pname;
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "a6de473ad8eb7cd7c2fba6a738881764dc2c5f83";
|
|
|
|
hash = "sha256-1fdGx6pYWnoyJ5ei1qZlXZG2mUEdjrRI7+X352XE/7A=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|