summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCayetano Santos <csantosb@inventati.org>2025-06-12 10:35:24 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-06-15 21:43:03 +0100
commit035bacebc21c263541b160bcdc27dc5ed36af551 (patch)
tree479c2d6ddcbc2a680599b6ed1ce92f77a4712e8e
parentddd2367ef31d7037dc5fc7524f21d5e11afb1306 (diff)
gnu: Add python-cocotb-bus.
* gnu/packages/electronics.scm (python-cocotb-bus): New variable. Change-Id: I66aad005077ebeae3badca7603848886436b74f1 Modified-by: Sharlatan Hellseher <sharlatanus@gmail.com> Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r--gnu/packages/electronics.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 084881c13f..0b27b3bc9e 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -609,6 +609,50 @@ for sigrok.")
and Verilog RTL using Python.")
(license license:bsd-3)))
+(define-public python-cocotb-bus
+ ;; XXX: The latest tagged release (2.6.1) was placed on <2023-07-01>, switch
+ ;; to tag when the fresh release is available.
+ (let ((commit "8269cbdacdc26e676eace4e19fc753c96ac9a059")
+ (revision "0"))
+ (package
+ (name "python-cocotb-bus")
+ (version (git-version "0.2.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cocotb/cocotb-bus/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "12762rdg630dq5qyvnv1g9kc36g0997nx8c5qndl34v6s9fc2152"))))
+ (build-system pyproject-build-system)
+ ;; TODO: Build documentation from <docs>.
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "-k" "-C" "tests")
+ (invoke "make" "-k" "-C" "examples")))))))
+ (native-inputs
+ (list iverilog
+ nvc
+ python-pytest
+ python-setuptools
+ python-wheel))
+ (propagated-inputs
+ (list python-cocotb
+ python-packaging
+ python-scapy))
+ (home-page "https://github.com/cocotb/cocotb-bus/")
+ (synopsis "Cocotb reusable tools")
+ (description "@code{Cocotb-bus} provides a set of utilities, test benches
+and reusable bus interfaces to be used with @code{cocotb}.")
+ (license license:bsd-3))))
+
(define-public python-edalize
(package
(name "python-edalize")