depot/third_party/nixpkgs/pkgs/applications/science/math/eigenmath/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

48 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, buildPackages
, unstableGitUpdater
}:
stdenv.mkDerivation rec {
pname = "eigenmath";
version = "unstable-2024-02-25";
src = fetchFromGitHub {
owner = "georgeweigt";
repo = pname;
rev = "4391a5bfe22d095cdf9fc12f376f64a8ffccccd9";
hash = "sha256-p+dnu35HGX8SgVpq5NczoZVehzfcuN+uucGurT7lWYM=";
};
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 ];
platforms = platforms.unix;
};
}