nixpkgs/pkgs/development/libraries/muparserx/default.nix

45 lines
1 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-08-11 00:31:36 +02:00
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "muparserx";
2021-12-07 17:23:42 +01:00
version = "4.0.11";
2020-08-11 00:31:36 +02:00
src = fetchFromGitHub {
owner = "beltoforion";
repo = "muparserx";
rev = "v${version}";
2021-12-07 17:23:42 +01:00
sha256 = "sha256-BWzHlz1mQYsvWa53EtO05Rb4rRHJBSRguJTHLtgqpPw=";
2020-08-11 00:31:36 +02:00
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
];
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 = "A C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more";
2020-08-11 00:31:36 +02:00
homepage = "https://beltoforion.de/en/muparserx/";
license = licenses.bsd2;
maintainers = with maintainers; [ drewrisinger ];
2021-02-15 03:59:35 +01:00
# selftest fails
broken = stdenv.isDarwin;
2020-08-11 00:31:36 +02:00
};
}