587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
49 lines
1 KiB
Nix
49 lines
1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, buildPackages
|
|
, unstableGitUpdater
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "eigenmath";
|
|
version = "unstable-2024-04-08";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "georgeweigt";
|
|
repo = pname;
|
|
rev = "c0be6c47309aa40d44784a3a4c4c07bc4e8fb6fa";
|
|
hash = "sha256-UVCazX0P03+e1exnpXrGNc/1vHxLH04Xtvgsy00UAoI=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|