depot/third_party/nixpkgs/pkgs/applications/science/math/eigenmath/default.nix

48 lines
1,006 B
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, buildPackages
, unstableGitUpdater
}:
stdenv.mkDerivation rec {
pname = "eigenmath";
version = "unstable-2023-05-12";
src = fetchFromGitHub {
owner = "georgeweigt";
repo = pname;
rev = "a6de473ad8eb7cd7c2fba6a738881764dc2c5f83";
hash = "sha256-1fdGx6pYWnoyJ5ei1qZlXZG2mUEdjrRI7+X352XE/7A=";
};
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 ];
};
}