From 96547edc50a226b3f357c5c31d08d1e74e072c5c Mon Sep 17 00:00:00 2001 From: Gabriel Wicki Date: Sat, 10 Jan 2026 13:09:56 +0100 Subject: [PATCH] gnu: Move gnucap to electronics module. * gnu/packages/engineering.scm (gnucap): Move ... * gnu/packages/electronics.scm: ... here. Change-Id: I2fe0d7f2cf6fc3f55374a7ec2eb9136573d4abd1 Signed-off-by: Gabriel Wicki --- gnu/packages/electronics.scm | 57 ++++++++++++++++++++++++++++++++++++ gnu/packages/engineering.scm | 56 ----------------------------------- 2 files changed, 57 insertions(+), 56 deletions(-) diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm index 1947f5d5e080c790eae725fb97ff16e377100397..846a8cc182b0572e90ec2524ce12171229a91cb3 100644 --- a/gnu/packages/electronics.scm +++ b/gnu/packages/electronics.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016, 2017, 2018 Theodoros Foradis ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2019 Clément Lassieur +;;; Copyright © 2019 Arun Isaac ;;; Copyright © 2021, 2023, 2024 Efraim Flashner ;;; Copyright © 2021 Leo Famulari ;;; Copyright © 2022, 2023, 2025 Maxim Cournoyer @@ -521,6 +522,62 @@ as well as pick-place files.") (properties '((lint-hidden-cve . ("CVE-2023-4508")))) (license license:gpl2+))) +(define-public gnucap + (package + (name "gnucap") + (version "20171003") + (source + (origin + (method url-fetch) + (uri (string-append + "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-" + version ".tar.gz")) + (sha256 + (base32 + "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g")))) + (build-system gnu-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + ;; Set correct rpath so that gnucap finds libgnucap.so. + (substitute* (list "apps/configure" "lib/configure" + "main/configure" "modelgen/configure") + (("LDFLAGS =") + (string-append "LDFLAGS = -Wl,-rpath=" #$output "/lib"))) + ;; gnucap uses a hand-written configure script that expects the + ;; --prefix argument to be the first argument passed to it. + (invoke "./configure" (string-append "--prefix=" #$output)))) + (replace 'check + ;; Attention: As discussed, a failing test in gnucap does not mean + ;; the build process has failed. Therefor we ignore, but still + ;; display the result of gnucap's test evaluation. + ;; https://codeberg.org/guix/guix/issues/5469#issuecomment-9695825 + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (let ((libpath "../lib/O:../apps/O")) + (with-directory-excursion "tests" + ;; Fix expected plugin search path for test c_attach.1.gc + (substitute* "==out/c_attach.1.gc.out" + (("/usr/local/lib/gnucap") + (string-append libpath ":" #$output "/lib/gnucap"))) + ;; Set library path so that gnucap can find libgnucap.so + ;; while running the tests. + (setenv "LD_LIBRARY_PATH" libpath) + (invoke "./test" + "../main/O/gnucap" "" "test-output" + "==out"))))))))) + (inputs (list readline)) + (home-page "https://www.gnu.org/software/gnucap/") + (synopsis "Mixed analog and digital circuit simulator") + (description "GNUcap is a circuit analysis package used for @acronym{EDA, +Electronic Design Automation}. It offers a general purpose circuit simulator +and can perform DC and transient analyses, fourier analysis and AC analysis. +The engine is designed to do true mixed-mode simulation.") + (license license:gpl3+))) + (define-public gtkwave ;; The last release is more than 2 years old, and there are improvements in ;; the master branch, such as GTK 4 support: pick the latest commit that diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 44e3444e0590624955189fb693a5722c2edd6bf0..e39c4ce20898f943978b3d26847f1cfda83aaa90 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -2484,62 +2484,6 @@ slicing software to x3g files for standalone 3D printing on common 3D printers.") (license license:gpl2+))) -(define-public gnucap - (package - (name "gnucap") - (version "20171003") - (source - (origin - (method url-fetch) - (uri (string-append - "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-" - version ".tar.gz")) - (sha256 - (base32 - "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g")))) - (build-system gnu-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (replace 'configure - (lambda _ - ;; Set correct rpath so that gnucap finds libgnucap.so. - (substitute* (list "apps/configure" "lib/configure" - "main/configure" "modelgen/configure") - (("LDFLAGS =") - (string-append "LDFLAGS = -Wl,-rpath=" #$output "/lib"))) - ;; gnucap uses a hand-written configure script that expects the - ;; --prefix argument to be the first argument passed to it. - (invoke "./configure" (string-append "--prefix=" #$output)))) - (replace 'check - ;; Attention: As discussed, a failing test in gnucap does not mean - ;; the build process has failed. Therefor we ignore, but still - ;; display the result of gnucap's test evaluation. - ;; https://codeberg.org/guix/guix/issues/5469#issuecomment-9695825 - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (let ((libpath "../lib/O:../apps/O")) - (with-directory-excursion "tests" - ;; Fix expected plugin search path for test c_attach.1.gc - (substitute* "==out/c_attach.1.gc.out" - (("/usr/local/lib/gnucap") - (string-append libpath ":" #$output "/lib/gnucap"))) - ;; Set library path so that gnucap can find libgnucap.so - ;; while running the tests. - (setenv "LD_LIBRARY_PATH" libpath) - (invoke "./test" - "../main/O/gnucap" "" "test-output" - "==out"))))))))) - (inputs (list readline)) - (home-page "https://www.gnu.org/software/gnucap/") - (synopsis "Mixed analog and digital circuit simulator") - (description "GNUcap is a circuit analysis package used for @acronym{EDA, -Electronic Design Automation}. It offers a general purpose circuit simulator -and can perform DC and transient analyses, fourier analysis and AC analysis. -The engine is designed to do true mixed-mode simulation.") - (license license:gpl3+))) - (define-public cutter (package (name "cutter")