~ruther/guix-local

96547edc50a226b3f357c5c31d08d1e74e072c5c — Gabriel Wicki a month ago 81c9dd8
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 <gabriel@erlikon.ch>
2 files changed, 57 insertions(+), 56 deletions(-)

M gnu/packages/electronics.scm
M gnu/packages/engineering.scm
M gnu/packages/electronics.scm => gnu/packages/electronics.scm +57 -0
@@ 2,6 2,7 @@
;;; Copyright © 2016, 2017, 2018 Theodoros Foradis <theodoros@foradis.org>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2021, 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
;;; Copyright © 2022, 2023, 2025 Maxim Cournoyer <maxim@guixotic.coop>


@@ 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

M gnu/packages/engineering.scm => gnu/packages/engineering.scm +0 -56
@@ 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")