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-06-24 18:47:55 +00:00
|
|
|
version = "3.27-unstable-2024-06-20";
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "georgeweigt";
|
|
|
|
repo = pname;
|
2024-06-24 18:47:55 +00:00
|
|
|
rev = "c3e3da104dbef888c3e52659134d5e9bdc12764d";
|
|
|
|
hash = "sha256-fqCphnRQw79v7ZTCZU9ucm/R7BKY7yCZYDSnxD7uRS8=";
|
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
|
|
|
};
|
|
|
|
}
|