50 lines
1 KiB
Nix
50 lines
1 KiB
Nix
|
{ lib
|
||
|
, stdenv
|
||
|
, fetchFromGitHub
|
||
|
, buildPackages
|
||
|
, unstableGitUpdater
|
||
|
}:
|
||
|
|
||
|
stdenv.mkDerivation rec {
|
||
|
pname = "eigenmath";
|
||
|
version = "3.27-unstable-2024-10-18";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "georgeweigt";
|
||
|
repo = pname;
|
||
|
rev = "a9d3be2c64a35e06691ba61fd1bf0d9b9cd5822d";
|
||
|
hash = "sha256-3t5AsUTNXnkXUfrGeGWcMwwC8kBhpSVx1ioVfKXloZA=";
|
||
|
};
|
||
|
|
||
|
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;
|
||
|
};
|
||
|
}
|