From 1e8b74f393c8492b2667f8a80bc805804d230dfe Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:31:36 -0400 Subject: [PATCH] muparserx: init at 4.0.8 --- .../libraries/muparserx/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/libraries/muparserx/default.nix diff --git a/pkgs/development/libraries/muparserx/default.nix b/pkgs/development/libraries/muparserx/default.nix new file mode 100644 index 00000000000..2c5bde316b4 --- /dev/null +++ b/pkgs/development/libraries/muparserx/default.nix @@ -0,0 +1,42 @@ +{ stdenv +, fetchFromGitHub +, cmake +}: + +stdenv.mkDerivation rec { + pname = "muparserx"; + version = "4.0.8"; + + src = fetchFromGitHub { + owner = "beltoforion"; + repo = "muparserx"; + rev = "v${version}"; + sha256 = "097pkdffv0phr0345hy06mjm5pfy259z13plsvbxvcmds80wl48v"; + }; + + 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 stdenv.lib; { + description = "A C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more."; + homepage = "https://beltoforion.de/en/muparserx/"; + license = licenses.bsd2; + maintainers = with maintainers; [ drewrisinger ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 08e3fe0cf6f..aa1165985a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14317,6 +14317,8 @@ in inherit (darwin.stubs) setfile; }; + muparserx = callPackage ../development/libraries/muparserx { }; + mutest = callPackage ../development/libraries/mutest { }; mygpoclient = pythonPackages.mygpoclient;