87f9c27ba9
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
47 lines
1,006 B
Nix
47 lines
1,006 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, buildPackages
|
|
, unstableGitUpdater
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "eigenmath";
|
|
version = "unstable-2023-04-07";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "georgeweigt";
|
|
repo = pname;
|
|
rev = "dd6a01da6e7f52a15af5bd584e93edf1a77bc04b";
|
|
hash = "sha256-GZkC/Tvep7fL5nJyz0ZN7z0lUhGX4EJlXVswwAyegUE=";
|
|
};
|
|
|
|
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";
|
|
homepage = "https://georgeweigt.github.io";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ nickcao ];
|
|
};
|
|
}
|