guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/15: gnu: Add zig-doctest.


From: guix-commits
Subject: 08/15: gnu: Add zig-doctest.
Date: Wed, 4 Dec 2024 12:52:49 -0500 (EST)

hako pushed a commit to branch wip-zig-bootstrap
in repository guix.

commit 37efdee29d63d27a7ebe7eab07b5392bd1b270f6
Author: Hilton Chain <hako@ultrarare.space>
AuthorDate: Sat Nov 30 13:42:02 2024 +0800

    gnu: Add zig-doctest.
    
    * gnu/packages/zig-xyz.scm (zig-doctest): New variable.
    
    Change-Id: Id182de6b0abff3099cb4847532f42ef8a7727541
---
 gnu/packages/zig-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
index 6e58356586..7028d09872 100644
--- a/gnu/packages/zig-xyz.scm
+++ b/gnu/packages/zig-xyz.scm
@@ -60,6 +60,41 @@
       (home-page "https://github.com/ziglibs/diffz";)
       (license license:expat))))
 
+(define-public zig-doctest
+  (let ((commit "725a93787cb1e24e2a183971d52f4ea12d9e1757")
+        (revision "0"))
+    (package
+      (name "zig-doctest")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/kristoff-it/zig-doctest";)
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "05xk4vz5lzv3660phlyhnpd7g8j49zlv3hfsa8bl0flj3mvmhvzc"))))
+      (build-system zig-build-system)
+      (arguments
+       (list #:install-source? #f
+             ;; No test suite.
+             #:tests? #f
+             #:zig-release-type "safe"))
+      (synopsis "Tool for testing Zig code snippets")
+      (description
+       "@command{doctest} is a code rendering tool that on top of providing
+syntax highlighting it also can run your code snippets to ensure that they
+behave as expected.
+
+Other than the syntax highlighting, this tool gives you the option of testing
+scripts that are expected to fail. This is something that the built-in testing
+framework of Zig doesn't allow to do in the same way. This is particularly
+useful when demoing things like runtime checks in safe release modes, which
+will cause the executable to crash.")
+      (home-page "https://github.com/kristoff-it/zig-doctest";)
+      (license license:expat))))
+
 (define-public zig-known-folders
   (let ((commit "1cceeb70e77dec941a4178160ff6c8d05a74de6f")
         (revision "0"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]