~ruther/guix-local

cdfb63f7ebd241989866094741e05917e598dd26 — Cayetano Santos 4 months ago 72a97ed
gnu: xyce-serial/parallel: Move to electronics.

* gnu/packages/engineering.scm (xyce-serial, xyce-parallel,
trilinos-parallel-xyce, trilinos-serial-xyce): Move from here ...
* gnu/packages/electronics.scm: ... to here.

Change-Id: I98d83ec4b1f86c31c355a22aea2f849155272504
Signed-off-by: Gabriel Wicki <gabriel@erlikon.ch>
2 files changed, 154 insertions(+), 152 deletions(-)

M gnu/packages/electronics.scm
M gnu/packages/engineering.scm
M gnu/packages/electronics.scm => gnu/packages/electronics.scm +154 -0
@@ 23,6 23,7 @@
;;; Copyright © 2022, 2025 Evgeny Pisemsky <mail@pisemsky.site>
;;; Copyright © 2025, Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020, 2023 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;


@@ 75,6 76,7 @@
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages gawk)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages gd)
  #:use-module (gnu packages gdb)
  #:use-module (gnu packages gettext)


@@ 2459,6 2461,96 @@ using different abstraction levels.")
VPI Interface, Elaborator, Serialization, Visitor and Listener.")
    (license license:asl2.0)))

(define trilinos-serial-xyce
  ;; Note: This is a Trilinos containing only the packages Xyce needs, so we
  ;; keep it private.  See
  ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#248>.
  ;; TODO: Remove when we have modular Trilinos packages?
  (package
    (name "trilinos-serial-xyce")
    (version "12.12.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/trilinos/Trilinos")
             (commit (string-append "trilinos-release-"
                                    (string-map (lambda (chr)
                                                  (case chr
                                                    ((#\.) #\-)
                                                    (else chr)))
                                                version)))))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "1smz3wlpfyjn0czmpl8bj4hw33p1zi9nnfygpsx7jl1523nypa1n"))))
    (build-system cmake-build-system)
    (arguments
     (list
      #:tests? #f                       ;no tests
      #:phases
      #~(modify-phases %standard-phases
          ;; Delete unneeded tribits(build system) directory which makes
          ;; validate-runpath phase to fail.
          (add-before 'validate-runpath 'delete-tribits
            (lambda _
              (delete-file-recursively
               (string-append #$output "/lib/cmake/tribits")))))
      #:configure-flags
      #~(list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
              "-DCMAKE_C_FLAGS=-O3 -fPIC"
              "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
              "-DTrilinos_ENABLE_NOX=ON"
              "-DNOX_ENABLE_LOCA=ON"
              "-DTrilinos_ENABLE_EpetraExt=ON"
              "-DEpetraExt_BUILD_BTF=ON"
              "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
              "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
              "-DTrilinos_ENABLE_TrilinosCouplings=ON"
              "-DTrilinos_ENABLE_Ifpack=ON"
              "-DTrilinos_ENABLE_Isorropia=ON"
              "-DTrilinos_ENABLE_AztecOO=ON"
              "-DTrilinos_ENABLE_Belos=ON"
              "-DTrilinos_ENABLE_Teuchos=ON"
              "-DTeuchos_ENABLE_COMPLEX=ON"
              "-DTrilinos_ENABLE_Amesos=ON"
              "-DAmesos_ENABLE_KLU=ON"
              "-DAmesos_ENABLE_UMFPACK=ON"
              "-DTrilinos_ENABLE_Sacado=ON"
              "-DTrilinos_ENABLE_Kokkos=OFF"
              "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
              "-DTPL_ENABLE_AMD=ON"
              "-DTPL_ENABLE_UMFPACK=ON"
              "-DTPL_ENABLE_BLAS=ON"
              "-DTPL_ENABLE_LAPACK=ON")))
    (native-inputs (list gfortran swig))
    (inputs (list boost lapack suitesparse))
    (home-page "https://trilinos.org")
    (synopsis "Engineering and scientific problems algorithms")
    (description
     "The Trilinos Project is an effort to develop algorithms and enabling
technologies within an object-oriented software framework for the solution of
large-scale, complex multi-physics engineering and scientific problems.  A
unique design feature of Trilinos is its focus on packages.")
    (license (list license:lgpl2.1+
                   license:bsd-3))))

(define trilinos-parallel-xyce
  (package
    (inherit trilinos-serial-xyce)
    (name "trilinos-parallel-xyce")
    (arguments
     (substitute-keyword-arguments
         (package-arguments trilinos-serial-xyce)
       ((#:configure-flags flags)
        #~(cons* "-DTrilinos_ENABLE_ShyLU=ON"
                 "-DTrilinos_ENABLE_Zoltan=ON"
                 "-DTPL_ENABLE_MPI=ON"
                 #$flags))))
    (inputs
     (modify-inputs (package-inputs trilinos-serial-xyce)
       (prepend openmpi)))))

(define-public verilator
  (package
    (name "verilator")


@@ 2545,6 2637,68 @@ support for ESD or COMEDI sources.")
    (home-page "https://xoscope.sourceforge.net/")
    (license license:gpl2+))))

(define-public xyce-serial
  (package
    (name "xyce-serial")
    (version "6.8")
    (source
     (origin (method url-fetch)
             (uri (string-append "https://archive.org/download/Xyce-"
                                 version "/Xyce-" version ".tar.gz"))
             (sha256
              (base32
               "09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
    (build-system gnu-build-system)
    (arguments
     (list
      #:tests? #f
      #:configure-flags
      #~(list
         "CXXFLAGS=-O3"
         (string-append "CFLAGS="
                        " -Wno-error=builtin-declaration-mismatch"
                        " -Wno-error=implicit-function-declaration"
                        " -Wno-error=implicit-int")
         (string-append "ARCHDIR=" #$trilinos-serial-xyce))))
    (native-inputs
     (list bison-3.0                    ;'configure' fails with Bison 3.4
           flex
           gfortran))
    (inputs
     (list fftw lapack suitesparse trilinos-serial-xyce))
    (home-page "https://xyce.sandia.gov/")
    (synopsis "High-performance analog circuit simulator")
    (description
     "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
capable of solving extremely large circuit problems by supporting large-scale
parallel computing platforms.  It also supports serial execution.")
    (license license:gpl3+)))

(define-public xyce-parallel
  (package
    (inherit xyce-serial)
    (name "xyce-parallel")
    (arguments
     (substitute-keyword-arguments
         (package-arguments xyce-serial)
       ((#:configure-flags flags)
        #~(list "CXXFLAGS=-O3"
                "CXX=mpiCC"
                "CC=mpicc"
                "F77=mpif77"
                "--enable-mpi"
                (string-append
                 "CFLAGS="
                 " -Wno-error=builtin-declaration-mismatch"
                 " -Wno-error=implicit-function-declaration"
                 " -Wno-error=implicit-int")
                (string-append "ARCHDIR=" #$trilinos-parallel-xyce)))))
    (propagated-inputs (list openmpi))
    (inputs
     (modify-inputs (package-inputs xyce-serial)
       (append zlib)
       (replace "trilinos-serial-xyce" trilinos-parallel-xyce)))))

(define-public yosys
  (package
    (name "yosys")

M gnu/packages/engineering.scm => gnu/packages/engineering.scm +0 -152
@@ 2286,158 2286,6 @@ and a fallback for environments without libc for Zydis.")
high-performance parallel differential evolution (DE) optimization algorithm.")
    (license license:gpl2+)))

(define trilinos-serial-xyce
  ;; Note: This is a Trilinos containing only the packages Xyce needs, so we
  ;; keep it private.  See
  ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#248>.
  ;; TODO: Remove when we have modular Trilinos packages?
  (package
    (name "trilinos-serial-xyce")
    (version "12.12.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/trilinos/Trilinos")
             (commit (string-append "trilinos-release-"
                                    (string-map (lambda (chr)
                                                  (case chr
                                                    ((#\.) #\-)
                                                    (else chr)))
                                                version)))))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "1smz3wlpfyjn0czmpl8bj4hw33p1zi9nnfygpsx7jl1523nypa1n"))))
    (build-system cmake-build-system)
    (arguments
     (list
      #:tests? #f                       ;no tests
      #:phases
      #~(modify-phases %standard-phases
          ;; Delete unneeded tribits(build system) directory which makes
          ;; validate-runpath phase to fail.
          (add-before 'validate-runpath 'delete-tribits
            (lambda _
              (delete-file-recursively
               (string-append #$output "/lib/cmake/tribits")))))
      #:configure-flags
      #~(list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
              "-DCMAKE_C_FLAGS=-O3 -fPIC"
              "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
              "-DTrilinos_ENABLE_NOX=ON"
              "-DNOX_ENABLE_LOCA=ON"
              "-DTrilinos_ENABLE_EpetraExt=ON"
              "-DEpetraExt_BUILD_BTF=ON"
              "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
              "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
              "-DTrilinos_ENABLE_TrilinosCouplings=ON"
              "-DTrilinos_ENABLE_Ifpack=ON"
              "-DTrilinos_ENABLE_Isorropia=ON"
              "-DTrilinos_ENABLE_AztecOO=ON"
              "-DTrilinos_ENABLE_Belos=ON"
              "-DTrilinos_ENABLE_Teuchos=ON"
              "-DTeuchos_ENABLE_COMPLEX=ON"
              "-DTrilinos_ENABLE_Amesos=ON"
              "-DAmesos_ENABLE_KLU=ON"
              "-DAmesos_ENABLE_UMFPACK=ON"
              "-DTrilinos_ENABLE_Sacado=ON"
              "-DTrilinos_ENABLE_Kokkos=OFF"
              "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
              "-DTPL_ENABLE_AMD=ON"
              "-DTPL_ENABLE_UMFPACK=ON"
              "-DTPL_ENABLE_BLAS=ON"
              "-DTPL_ENABLE_LAPACK=ON")))
    (native-inputs (list gfortran swig))
    (inputs (list boost lapack suitesparse))
    (home-page "https://trilinos.org")
    (synopsis "Engineering and scientific problems algorithms")
    (description
     "The Trilinos Project is an effort to develop algorithms and enabling
technologies within an object-oriented software framework for the solution of
large-scale, complex multi-physics engineering and scientific problems.  A
unique design feature of Trilinos is its focus on packages.")
    (license (list license:lgpl2.1+
                   license:bsd-3))))

(define-public xyce-serial
  (package
    (name "xyce-serial")
    (version "6.8")
    (source
     (origin (method url-fetch)
             (uri (string-append "https://archive.org/download/Xyce-"
                                 version "/Xyce-" version ".tar.gz"))
             (sha256
              (base32
               "09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
    (build-system gnu-build-system)
    (arguments
     (list
      #:tests? #f
      #:configure-flags
      #~(list
         "CXXFLAGS=-O3"
         (string-append "CFLAGS="
                        " -Wno-error=builtin-declaration-mismatch"
                        " -Wno-error=implicit-function-declaration"
                        " -Wno-error=implicit-int")
         (string-append "ARCHDIR=" #$trilinos-serial-xyce))))
    (native-inputs
     (list bison-3.0                    ;'configure' fails with Bison 3.4
           flex
           gfortran))
    (inputs
     (list fftw lapack suitesparse trilinos-serial-xyce))
    (home-page "https://xyce.sandia.gov/")
    (synopsis "High-performance analog circuit simulator")
    (description
     "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
capable of solving extremely large circuit problems by supporting large-scale
parallel computing platforms.  It also supports serial execution.")
    (license license:gpl3+)))

(define trilinos-parallel-xyce
  (package
    (inherit trilinos-serial-xyce)
    (name "trilinos-parallel-xyce")
    (arguments
     (substitute-keyword-arguments
         (package-arguments trilinos-serial-xyce)
       ((#:configure-flags flags)
        #~(cons* "-DTrilinos_ENABLE_ShyLU=ON"
                 "-DTrilinos_ENABLE_Zoltan=ON"
                 "-DTPL_ENABLE_MPI=ON"
                 #$flags))))
    (inputs
     (modify-inputs (package-inputs trilinos-serial-xyce)
       (prepend openmpi)))))

(define-public xyce-parallel
  (package
    (inherit xyce-serial)
    (name "xyce-parallel")
    (arguments
     (substitute-keyword-arguments
         (package-arguments xyce-serial)
       ((#:configure-flags flags)
        #~(list "CXXFLAGS=-O3"
                "CXX=mpiCC"
                "CC=mpicc"
                "F77=mpif77"
                "--enable-mpi"
                (string-append
                 "CFLAGS="
                 " -Wno-error=builtin-declaration-mismatch"
                 " -Wno-error=implicit-function-declaration"
                 " -Wno-error=implicit-int")
                (string-append "ARCHDIR=" #$trilinos-parallel-xyce)))))
    (propagated-inputs (list openmpi))
    (inputs
     (modify-inputs (package-inputs xyce-serial)
       (append zlib)
       (replace "trilinos-serial-xyce" trilinos-parallel-xyce)))))

(define-public librepcb
  (package
    (name "librepcb")