diff mbox series

[bug#65565,v2] gnu: chaiscript: Fix tests.

Message ID e3de824c24e6d856b51eff65932364b769f58c66.1693305601.git.iyzsong@member.fsf.org
State New
Headers show
Series [bug#65565,v2] gnu: chaiscript: Fix tests. | expand

Commit Message

vasilii.smirnov--- via Guix-patches" via Aug. 29, 2023, 10:40 a.m. UTC
From: 宋文武 <iyzsong@member.fsf.org>

* gnu/packages/cpp.scm (chaiscript)[source]: Add snippet.
[inputs]: Add catch2.
---
 gnu/packages/cpp.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)


base-commit: 715d203b414727be43e405d09e86aa823125a4b3
diff mbox series

Patch

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 3b949198c7..2f8cc2ce25 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -509,8 +509,17 @@  (define-public chaiscript
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0i1c88rn1wwz8nf3dpapcdkk4w623m3nksfy5yjai10k9irkzy3c"))))
+        (base32 "0i1c88rn1wwz8nf3dpapcdkk4w623m3nksfy5yjai10k9irkzy3c"))
+       (modules '((guix build utils)))
+       ;; It's bundled catch2 fails to build.
+       (snippet '(begin
+                   (delete-file "unittests/catch.hpp")
+                   (substitute* "unittests/compiled_tests.cpp"
+                     (("catch[.]hpp") "catch2/catch.hpp"))
+                   (substitute* "unittests/type_info_test.cpp"
+                     (("catch[.]hpp") "catch2/catch.hpp"))))))
     (build-system cmake-build-system)
+    (inputs (list catch2))
     (home-page "https://chaiscript.com/")
     (synopsis "Embedded scripting language designed for C++")
     (description