nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "muparserx";
10 version = "4.0.12";
11
12 src = fetchFromGitHub {
13 owner = "beltoforion";
14 repo = "muparserx";
15 rev = "v${version}";
16 sha256 = "sha256-rekPXmncNdVX6LvPQP1M2Pzs3pyiCCcLPLnPFiyWJ4s=";
17 };
18
19 nativeBuildInputs = [ cmake ];
20
21 doCheck = true;
22 checkPhase = ''
23 echo "***Muparserx self-test***"
24 echo "quit" | ./example > test_result.log
25 cat test_result.log
26 if grep -Fqi "failed" test_result.log; then
27 echo ">=1 muparserx tests failed"
28 exit 1
29 else
30 echo -e "\nmuparserx tests succeeded"
31 fi
32 '';
33
34 meta = with lib; {
35 description = "C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more";
36 homepage = "https://beltoforion.de/en/muparserx/";
37 license = licenses.bsd2;
38 maintainers = with maintainers; [ drewrisinger ];
39 };
40}