~ruther/guix-local

0c39b751d20441baa803c8708f450962840ec4f6 — Thomas Kramer 2 months ago c93abdd
gnu: Add lctime.

* gnu/packages/electronics.scm (lctime): Add variable.

Change-Id: I03f0fd455c9e5e8f69a2fa71b8f6bea6f60d43ef
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
1 files changed, 48 insertions(+), 0 deletions(-)

M gnu/packages/electronics.scm
M gnu/packages/electronics.scm => gnu/packages/electronics.scm +48 -0
@@ 844,6 844,54 @@ chip cross-sections basked on mask data.")
    ;; The license version will be clarified with the next version bump.
    (license license:gpl3+)))

(define-public lctime
  (package
    (name "lctime")
    (version "0.0.28")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://codeberg.org/librecell/lctime")
             (commit version)))
       (sha256
        (base32 "18s7by4ndxxha1yr6sns389smgrz9df5sgqwvvxcw8wwv8v7mpjd"))
       (file-name (git-file-name name version))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'patch-ngspice-path
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/lctime/characterization/ngspice_subprocess.py"
                (("= 'ngspice'")
                 (format #f "= ~s"
                         (search-input-file inputs "bin/ngspice"))))))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
                (invoke "bash" "./run_tests.sh")))))))
    (inputs (list ngspice
                  pyspice
                  python-joblib
                  python-klayout
                  python-liberty-parser
                  python-networkx
                  python-numpy
                  python-ply
                  python-requests
                  python-scipy
                  python-sympy))
    (native-inputs (list bash-minimal python-pytest python-setuptools))
    (home-page "https://codeberg.org/librecell/lctime")
    (synopsis "CMOS standard-cell characterization tool")
    (description
     "lctime extracts timing and power characteristics of CMOS standard-cells.
It simulates the netlists of the cells with ngspice and writes the
characterization result in a liberty library file.")
    (license license:agpl3+)))

(define-public libngspice
  ;; Note: The ngspice's build system does not allow us to build both the
  ;; library and the executables in one go.  Thus, we have two packages.