* gnu/packages/maths.scm (exprtk): New variable. Change-Id: I14bd7c26d111f399b5a3624456f43b3fe7dacd40 --- gnu/packages/maths.scm | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 9257a8adb7..e3638794ad 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -67,6 +67,7 @@ ;;; Copyright © 2024 Foundation Devices, Inc. ;;; Copyright © 2024 Artyom V. Poptsov ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2024 Sughosha ;;; ;;; This file is part of GNU Guix. ;;; @@ -8079,6 +8080,58 @@ (define-public elemental reduction.") (license license:bsd-2)))) +(define-public exprtk + (let ((commit "7b993904a21639304edd4db261f6e2cdcf6d936b") ;no tags + (revision "0")) + (package + (name "exprtk") + (version (git-version "0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ArashPartow/exprtk") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rza8lmn4mbdbrdj1aqir37nk8z034cqwr2s1ypyqgflckirwzdp")) + (modules '((guix build utils))) + (snippet + ;; Prevent linking to /usr/lib. + '(substitute* "Makefile" + (("-L/usr/lib") ""))))) + (build-system gnu-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (delete 'configure) ;no configure script + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./exprtk_test")))) + (replace 'install + (lambda _ + ;; Install executable binaries excluding that of testing. + (for-each (lambda (file) + (when (and (executable-file? file) + (not (string=? "exprtk_test" + (basename file)))) + (install-file file + (string-append #$output + "/bin")))) + (find-files ".")) + ;; Install header. + (install-file "exprtk.hpp" + (string-append #$output "/include"))))))) + (home-page "https://github.com/ArashPartow/exprtk") + (synopsis "C++ mathematical expression parsing and evaluation library") + (description + "C++ Mathematical Expression Toolkit Library (ExprTk) is a run-time +mathematical expression parsing and evaluation engine. The parsing engine +supports numerous forms of functional and logic processing semantics and is +easily extensible.") + (license license:expat)))) + (define-public mcrl2 (package (name "mcrl2") -- 2.46.0