Subject: [PATCH] gnu: Add uhdm.

From: Cayetano Santos <[email-masked]>
Date: Tue, 11 Feb 2025 17:25:49 +0100

* gnu/packages/electronics.scm (uhdm): New variable.

Change-Id: I581fa4de57c377f6b2c99aa439fdfb98e2e472a9
---
 gnu/packages/electronics.scm | 43 ++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index df0238c348..868bfb0571 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages electronics)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages c)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages embedded)
@@ -52,10 +53,13 @@ (define-module (gnu packages electronics)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages stb)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages toolkits))
 
 (define-public libserialport
@@ -522,3 +526,42 @@ (define-public minipro
 Additionally your user must be member of the @code{plugdev} group.")
       (home-page "https://gitlab.com/DavidGriffith/minipro")
       (license license:gpl3+))))
+
+(define-public uhdm
+  (package
+    (name "uhdm")
+    (version "1.84")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/chipsalliance/UHDM/")
+             (commit (string-append "v" version))
+             (recursive? #f)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1364kv8fg4nh76qs7j1h7sqfhsfav6bda9hcxkqhcgzsiysnxqwy"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure)
+                   (replace 'check
+                     (lambda* (#:key tests? #:allow-other-keys)
+                       (when tests?
+                         (invoke "make" "test")))))
+      #:make-flags #~(list (string-append "PREFIX="
+                                          #$output))))
+    (inputs (list python-orderedmultidict
+                  python
+                  cmake-minimal
+                  openssl
+                  zlib
+                  googletest
+                  capnproto))
+    (home-page "https://github.com/chipsalliance/UHDM/")
+    (synopsis "Universal Hardware Data Model")
+    (description
+     "UHDM is a complete modeling of the IEEE SystemVerilog Object Model with
+VPI Interface, Elaborator, Serialization, Visitor and Listener.")
+    (license license:asl2.0)))

base-commit: e72b988cfb36f48ec8f43700fe0ad132acb98ca1
--
2.48.1