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";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0-unstable-2024-05-12";
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "georgeweigt";
|
|
|
|
repo = pname;
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "978b3bd582a90c8e82079f2e4e4a3a5038cbbe08";
|
|
|
|
hash = "sha256-DoGX8nUcWcioTq8ymB+HLsCnt9V6HTKSX4Zs2CQz78Q=";
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "eigenmath";
|
2023-03-08 16:32:21 +00:00
|
|
|
homepage = "https://georgeweigt.github.io";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ nickcao ];
|
2023-08-22 20:05:09 +00:00
|
|
|
platforms = platforms.unix;
|
2023-03-08 16:32:21 +00:00
|
|
|
};
|
|
|
|
}
|