nixpkgs/pkgs/by-name/mu/muparserx/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
918 B
Nix
Raw Normal View History

{ lib, stdenv
2020-08-10 22:31:36 +00:00
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "muparserx";
2023-03-10 16:56:19 +00:00
version = "4.0.12";
2020-08-10 22:31:36 +00:00
src = fetchFromGitHub {
owner = "beltoforion";
repo = "muparserx";
rev = "v${version}";
2023-03-10 16:56:19 +00:00
sha256 = "sha256-rekPXmncNdVX6LvPQP1M2Pzs3pyiCCcLPLnPFiyWJ4s=";
2020-08-10 22:31:36 +00:00
};
nativeBuildInputs = [ cmake ];
doCheck = true;
checkPhase = ''
echo "***Muparserx self-test***"
echo "quit" | ./example > test_result.log
cat test_result.log
if grep -Fqi "failed" test_result.log; then
echo ">=1 muparserx tests failed"
exit 1
else
echo -e "\nmuparserx tests succeeded"
fi
'';
meta = with lib; {
description = "C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more";
2020-08-10 22:31:36 +00:00
homepage = "https://beltoforion.de/en/muparserx/";
license = licenses.bsd2;
maintainers = with maintainers; [ drewrisinger ];
};
}