summaryrefslogtreecommitdiff
path: root/gnu/packages/engineering.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/engineering.scm')
-rw-r--r--gnu/packages/engineering.scm279
1 files changed, 124 insertions, 155 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 719a861f84..d61b5ce288 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -105,6 +105,7 @@
#:use-module (gnu packages digest)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages electronics)
#:use-module (gnu packages emacs-build)
#:use-module (gnu packages emacs-xyz)
#:use-module (gnu packages file)
@@ -721,12 +722,21 @@ multipole-accelerated algorithm.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
+ (base32 "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))
+ (patches (search-patches "fritzing-0.9.6-fix-types.patch"))))
(build-system gnu-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-files
+ (lambda _
+ ;; Trick the internal mechanism to load the parts
+ (substitute* "src/version/partschecker.cpp"
+ ((".*git_libgit2_init.*")
+ "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
+ (substitute* "src/utils/textutils.cpp"
+ (("QUuid::createUuid\\(\\)") "QUuid()"))))
(replace 'configure
(lambda _
;; Integrate parts library
@@ -743,17 +753,22 @@ multipole-accelerated algorithm.")
"INCLUDEPATH += $$LIBGIT2INCLUDE\n"
"LIBS += -L$$LIBGIT2LIB -lgit2\n"))
(("^.*pri/libgit2detect.pri.") ""))
- ;; Trick the internal mechanism to load the parts
- (substitute* "src/version/partschecker.cpp"
- ((".*git_libgit2_init.*")
- "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
- ;; XXX: NixOS and Gento have a phase where they generate part
- ;; SQLite library, have proper investigation if it's required in
- ;; Guix as well.
(invoke "qmake"
(string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," #$output "/lib")
(string-append "PREFIX=" #$output)
- "phoenix.pro"))))))
+ "phoenix.pro")))
+ (add-after 'install 'generate-parts-db
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (env-qt-qpa-platform (getenv "QT_QPA_PLATFORM"))
+ (env-qt-hash-seed (getenv "QT_HASH_SEED")))
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ (setenv "QT_HASH_SEED" "0")
+ (invoke (string-append out "/bin/Fritzing")
+ "-db" (string-append out "/share/fritzing/parts/parts.db")
+ "-folder" (string-append out "/share/fritzing"))
+ (setenv "QT_QPA_PLATFORM" env-qt-qpa-platform)
+ (setenv "QT_HASH_SEED" env-qt-hash-seed)))))))
(native-inputs
(list fritzing-parts))
(inputs
@@ -1166,24 +1181,32 @@ Emacs).")
`("PATH" ":" prefix
(,(string-append python "/bin:"))))))))))
(native-search-paths
+ ;; Currently, KiCad environment variables are single-valued
+ ;; (see https://gitlab.com/kicad/code/kicad/-/issues/14792).
(list (search-path-specification
(variable "KICAD") ;to find kicad-doc
- (files '("")))
+ (files '(""))
+ (separator #f))
(search-path-specification
(variable "KICAD9_TEMPLATE_DIR")
- (files '("share/kicad/template")))
+ (files '("share/kicad/template"))
+ (separator #f))
(search-path-specification
(variable "KICAD9_SYMBOL_DIR")
- (files '("share/kicad/symbols")))
+ (files '("share/kicad/symbols"))
+ (separator #f))
(search-path-specification
(variable "KICAD9_FOOTPRINT_DIR")
- (files '("share/kicad/footprints")))
+ (files '("share/kicad/footprints"))
+ (separator #f))
(search-path-specification
(variable "KICAD9_3DMODEL_DIR")
- (files '("share/kicad/3dmodels")))
+ (files '("share/kicad/3dmodels"))
+ (separator #f))
(search-path-specification
(variable "KICAD_STOCK_DATA_HOME")
- (files '("share/kicad")))))
+ (files '("share/kicad"))
+ (separator #f))))
(native-inputs (list boost
desktop-file-utils
gettext-minimal
@@ -2263,67 +2286,6 @@ and a fallback for environments without libc for Zydis.")
high-performance parallel differential evolution (DE) optimization algorithm.")
(license license:gpl2+)))
-(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.
- ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>.
- (package
- (name "libngspice")
- (version "44.2")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.code.sf.net/p/ngspice/ngspice")
- (commit (string-append "ngspice-" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "1vp27149kx8l7397bv5p708jqph1kma8rb9bl7ckgmbr9sw9cn3q"))))
- (build-system gnu-build-system)
- (arguments
- (list
- #:tests? #f ;there are no tests for libngspice
- #:phases #~(modify-phases %standard-phases
- (add-after 'install 'delete-scripts
- (lambda _
- (delete-file-recursively
- (string-append #$output
- "/share/ngspice/scripts")))))
- #:configure-flags #~(list "--enable-openmp" "--enable-cider"
- "--enable-xspice" "--with-ngshared")))
- (native-inputs (list autoconf automake bison flex libtool))
- (inputs (list openmpi))
- (home-page "https://ngspice.sourceforge.io/")
- (synopsis "Mixed-level/mixed-signal circuit simulator")
- (description
- "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes
-@code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that
-provides code modeling support and simulation of digital components through
-an embedded event driven algorithm.")
- (license (list license:lgpl2.0+ ;code in frontend/numparam
- (license:non-copyleft "file:///COPYING") ;spice3 bsd-style
- license:bsd-3 ;ciderlib
- license:public-domain)))) ;xspice
-
-(define-public ngspice
- ;; The ngspice executables (see libngpsice above.)
- (package
- (inherit libngspice)
- (name "ngspice")
- (arguments
- (substitute-keyword-arguments (package-arguments libngspice)
- ;; Tests require a X server running, so we keep them disabled
- ((#:configure-flags flags)
- #~(cons* "--enable-rpath" "--with-x" "--with-readline=yes"
- (delete "--with-ngshared" #$flags)))
- ((#:phases phases)
- #~(modify-phases #$phases
- (delete 'delete-scripts)))))
- (native-inputs
- (modify-inputs (package-native-inputs libngspice)
- (append perl)))
- (inputs (list libngspice readline libxaw libx11))))
-
(define trilinos-serial-xyce
;; Note: This is a Trilinos containing only the packages Xyce needs, so we
;; keep it private. See
@@ -2349,43 +2311,43 @@ an embedded event driven algorithm.")
"1smz3wlpfyjn0czmpl8bj4hw33p1zi9nnfygpsx7jl1523nypa1n"))))
(build-system cmake-build-system)
(arguments
- `(#:out-of-source? #t
- #: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* (#:key outputs #:allow-other-keys)
- (delete-file-recursively
- (string-append (assoc-ref outputs "out")
- "/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")))
+ (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")
@@ -2411,21 +2373,22 @@ unique design feature of Trilinos is its focus on packages.")
"09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f
- #:configure-flags
- (list
- "CXXFLAGS=-O3"
- (string-append "ARCHDIR="
- (assoc-ref %build-inputs "trilinos")))))
+ (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
- `(("bison" ,bison-3.0) ;'configure' fails with Bison 3.4
- ("flex" ,flex)
- ("fortran" ,gfortran)))
+ (list bison-3.0 ;'configure' fails with Bison 3.4
+ flex
+ gfortran))
(inputs
- `(("fftw" ,fftw)
- ("suitesparse" ,suitesparse)
- ("lapack" ,lapack)
- ("trilinos" ,trilinos-serial-xyce)))
+ (list fftw lapack suitesparse trilinos-serial-xyce))
(home-page "https://xyce.sandia.gov/")
(synopsis "High-performance analog circuit simulator")
(description
@@ -2435,39 +2398,45 @@ parallel computing platforms. It also supports serial execution.")
(license license:gpl3+)))
(define trilinos-parallel-xyce
- (package (inherit trilinos-serial-xyce)
+ (package
+ (inherit trilinos-serial-xyce)
(name "trilinos-parallel-xyce")
(arguments
- `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
- ((#:configure-flags flags)
- `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
- "-DTrilinos_ENABLE_Zoltan=ON"
- "-DTPL_ENABLE_MPI=ON")
- ,flags)))))
+ (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
- `(("mpi" ,openmpi)
- ,@(package-inputs trilinos-serial-xyce)))))
+ (modify-inputs (package-inputs trilinos-serial-xyce)
+ (prepend openmpi)))))
(define-public xyce-parallel
- (package (inherit xyce-serial)
+ (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
- "ARCHDIR="
- (assoc-ref %build-inputs "trilinos")))))))
- (propagated-inputs
- `(("mpi" ,openmpi)))
+ (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
- `(("trilinos" ,trilinos-parallel-xyce)
- ,@(alist-delete "trilinos"
- (package-inputs xyce-serial))))))
+ (modify-inputs (package-inputs xyce-serial)
+ (append zlib)
+ (replace "trilinos-serial-xyce" trilinos-parallel-xyce)))))
(define-public librepcb
(package
@@ -3870,10 +3839,10 @@ executables, shared libraries and core dumps. It supports many architectures
and extensions.")
(license license:gpl3+)))
-(define-public emacs-poke
- ;; The 'emacs-poke' name may eventually refer to 'poke' from ELPA, which is
- ;; a different beast.
- (deprecated-package "emacs-poke" poke))
+;; The 'emacs-poke' name may eventually refer to 'poke' from ELPA, which is
+;; a different beast.
+(define-deprecated-package emacs-poke
+ poke)
(define-public pcb2gcode
;; XXX: The latest release was on <2022-09-12>, but master branch contains a