Subject: [PATCH v2] gnu: Add opensta.

From: Cayetano Santos <[email-masked]>
Date: Fri, 25 Apr 2025 15:24:30 +0200

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

Change-Id: If753078958535971c8ab3fd7c934d19d24f0a2f7

---
 gnu/packages/electronics.scm | 41 ++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 12e44f234a..63782661ee 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages electronics)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages c)
   #:use-module (gnu packages check)
@@ -45,6 +46,7 @@ (define-module (gnu packages electronics)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages embedded)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -53,6 +55,7 @@ (define-module (gnu packages electronics)
   #:use-module (gnu packages libftdi)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -65,6 +68,7 @@ (define-module (gnu packages electronics)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages stb)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages toolkits)
   #:use-module (gnu packages version-control))
@@ -415,6 +419,43 @@ (define-public openboardview
 @end itemize")
     (license license:expat)))
 
+(define-public opensta
+  ;; There are no releases, we use last commit.
+  (let ((commit "eb8d39a7dd81b5ca2582ad9bbce0fb6e094b3e0f")
+        (revision "0"))
+    (package
+      (name "opensta")
+      (version (git-version "2.6.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/parallaxsw/OpenSTA/")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0bpc7fj4pd5713yny2vrh542jbag1kj20g0ji01c9scqb9av5qw5"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (replace 'check
+              (lambda* (#:key (tests? #t) #:allow-other-keys)
+                (when tests?
+                  (invoke "../source/test/regression")))))
+        #:configure-flags
+        #~(list
+           (string-append "-DCUDD_DIR=" #$(this-package-input "cudd")))))
+      (native-inputs (list swig bison flex))
+      (inputs (list tcl tcllib zlib cudd eigen))
+      (synopsis "Parallax Static Timing Analyzer")
+      (description
+       "OpenSTA is a gate level static timing verifier.  As a stand-alone executable
+it can be used to verify the timing of a design using standard file formats.")
+      (home-page "https://github.com/parallaxsw/OpenSTA/")
+      (license license:gpl3))))
+
 (define-public pulseview
   (package
     (name "pulseview")

base-commit: 501a9603f5e3cda07f3be8e7fecac31f7af5ce52
--
2.49.0