Subject: [bug#76854] [PATCH 6/7] gnu: Add rust-error-stack-0.5.

From: Alex Bosco <[email-masked]>
Date: Sat, 8 Mar 2025 13:16:29 +0000

Change-Id: I880c83c5810da9c9140d408e7334bac49361f65a
---
 gnu/packages/crates-io.scm | 44 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 8027dfeb21..0bc1b68ed5 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -50,6 +50,7 @@
 ;;; Copyright © 2025 Divya Ranjan Pattanaik <[email-masked]>
 ;;; Copyright © 2025 Karl Hallsby <[email-masked]>
 ;;; Copyright © 2025 Andrew Wong <[email-masked]>
+;;; Copyright © 2025 Alex Bosco <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24318,6 +24319,49 @@ (define-public rust-error-code-2
        (("rust-libc" ,rust-libc-0.2)
         ("rust-str-buf" ,rust-str-buf-1))))))
 
+(define-public rust-error-stack-0.5
+  (package
+    (name "rust-error-stack")
+    (version "0.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "error-stack" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1lf5zy1fjjqdwjkc445sw80hpmxi63ymcxgjh3q6642x2hck6hgy"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f ;Tests expect entry point at parent repo (hash), not at subrepo (hash/libs/error-stack)
+       #:cargo-inputs (("rust-anyhow" ,rust-anyhow-1)
+                       ("rust-eyre" ,rust-eyre-0.6)
+                       ("rust-futures-core" ,rust-futures-core-0.3)
+                       ("rust-serde" ,rust-serde-1)
+                       ("rust-pin-project-lite" ,rust-pin-project-lite-0.2)
+                       ("rust-spin" ,rust-spin-0.9)
+                       ("rust-tracing" ,rust-tracing-0.1)
+                       ("rust-tracing-error" ,rust-tracing-error-0.2))
+       #:cargo-development-inputs (("rust-serde" ,rust-serde-1)
+                                   ("rust-ansi-to-html" ,rust-ansi-to-html-0.2)
+                                   ("rust-expect-test" ,rust-expect-test-1)
+                                   ("rust-futures" ,rust-futures-0.3)
+                                   ("rust-futures-util" ,rust-futures-util-0.3)
+                                   ("rust-insta" ,rust-insta-1)
+                                   ("rust-owo-colors" ,rust-owo-colors-4)
+                                   ("rust-regex" ,rust-regex-1)
+                                   ("rust-supports-color" ,rust-supports-color-3)
+                                   ("rust-supports-unicode" ,rust-supports-unicode-3)
+                                   ("rust-thiserror" ,rust-thiserror-2)
+                                   ("rust-tracing" ,rust-tracing-0.1)
+                                   ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3)
+                                   ("rust-trybuild" ,rust-trybuild-1))))
+    (home-page "https://github.com/hashintel/hash/tree/main/libs/error-stack")
+    (synopsis
+     "A context-aware error-handling library that supports arbitrary attached user data")
+    (description
+     "This package provides a context-aware error-handling library that supports arbitrary attached user data.")
+    (license license:expat)))
+
 (define-public rust-escape8259-0.5
   (package
     (name "rust-escape8259")
-- 
2.48.1