1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
4 ;;; Copyright © 2016, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
7 ;;; Copyright © 2016, 2017, 2018 Theodoros Foradis <theodoros@foradis.org>
8 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
9 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
11 ;;; Copyright © 2018, 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
12 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
13 ;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
14 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
15 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
16 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
17 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
18 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
19 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
21 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
22 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages engineering)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix gexp)
43 #:use-module (guix git-download)
44 #:use-module (guix svn-download)
45 #:use-module (guix monads)
46 #:use-module (guix store)
47 #:use-module (guix utils)
48 #:use-module ((srfi srfi-1) #:hide (zip))
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix build-system ant)
51 #:use-module (guix build-system cmake)
52 #:use-module (guix build-system gnu)
53 #:use-module (guix build-system python)
54 #:use-module (guix build-system qt)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages algebra)
57 #:use-module (gnu packages autotools)
58 #:use-module (gnu packages base)
59 #:use-module (gnu packages bdw-gc)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages boost)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages cmake)
64 #:use-module (gnu packages commencement)
65 #:use-module (gnu packages compression)
66 #:use-module (gnu packages curl)
67 #:use-module (gnu packages dejagnu)
68 #:use-module (gnu packages digest)
69 #:use-module (gnu packages documentation)
70 #:use-module (gnu packages flex)
71 #:use-module (gnu packages fontutils)
72 #:use-module (gnu packages fpga)
73 #:use-module (gnu packages freedesktop)
74 #:use-module (gnu packages gcc)
75 #:use-module (gnu packages gd)
76 #:use-module (gnu packages gettext)
77 #:use-module (gnu packages ghostscript)
78 #:use-module (gnu packages gl)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages gnome)
81 #:use-module (gnu packages gperf)
82 #:use-module (gnu packages graphics)
83 #:use-module (gnu packages graphviz)
84 #:use-module (gnu packages groff)
85 #:use-module (gnu packages gtk)
86 #:use-module (gnu packages guile)
87 #:use-module (gnu packages image)
88 #:use-module (gnu packages image-processing)
89 #:use-module (gnu packages imagemagick)
90 #:use-module (gnu packages libevent)
91 #:use-module (gnu packages linux) ;FIXME: for pcb
92 #:use-module (gnu packages lisp)
93 #:use-module (gnu packages m4)
94 #:use-module (gnu packages maths)
95 #:use-module (gnu packages man)
96 #:use-module (gnu packages multiprecision)
97 #:use-module (gnu packages mpi)
98 #:use-module (gnu packages ncurses)
99 #:use-module (gnu packages parallel)
100 #:use-module (gnu packages pcre)
101 #:use-module (gnu packages perl)
102 #:use-module (gnu packages pkg-config)
103 #:use-module (gnu packages python)
104 #:use-module (gnu packages python-xyz)
105 #:use-module (gnu packages qt)
106 #:use-module (gnu packages readline)
107 #:use-module (gnu packages swig)
108 #:use-module (gnu packages tbb)
109 #:use-module (gnu packages tcl)
110 #:use-module (gnu packages texinfo)
111 #:use-module (gnu packages tls)
112 #:use-module (gnu packages tex)
113 #:use-module (gnu packages version-control)
114 #:use-module (gnu packages web)
115 #:use-module (gnu packages wxwidgets)
116 #:use-module (gnu packages xml)
117 #:use-module (gnu packages openkinect)
118 #:use-module (gnu packages xorg))
120 (define-public librecad
127 "https://github.com/LibreCAD/LibreCAD/archive/"
129 (file-name (string-append name "-" version ".tar.gz"))
132 "01nvc1g3si05r5np1pzn62ah9w84p8nxa32wqrjh6gdi17jfvi3l"))))
133 (build-system gnu-build-system)
136 (modify-phases %standard-phases
137 ;; Without this patch boost complains that "make_array" is not a
138 ;; member of "boost::serialization".
139 (add-after 'unpack 'patch-boost-error
141 (substitute* "librecad/src/lib/math/lc_quadratic.h"
142 (("#include \"rs_vector.h\"" line)
144 "\n#include <boost/serialization/array_wrapper.hpp>")))
145 (substitute* "librecad/src/lib/math/rs_math.cpp"
146 (("#include <boost/numeric/ublas/matrix.hpp>" line)
147 (string-append "#include <boost/serialization/array_wrapper.hpp>\n"
150 ;; Fix build against Qt 5.11.
151 (add-after 'unpack 'add-missing-headers
153 (substitute* "librecad/src/ui/generic/widgetcreator.cpp"
154 (("#include <QPushButton>") "#include <QPushButton>
155 #include <QActionGroup>"))
157 (add-after 'unpack 'patch-paths
158 (lambda* (#:key outputs #:allow-other-keys)
159 (let ((out (assoc-ref outputs "out")))
160 (substitute* "librecad/src/lib/engine/rs_system.cpp"
161 (("/usr/share") (string-append out "/share"))))))
163 (lambda* (#:key inputs #:allow-other-keys)
164 (system* "qmake" (string-append "BOOST_DIR="
165 (assoc-ref inputs "boost")))))
167 (lambda* (#:key outputs #:allow-other-keys)
168 (let* ((out (assoc-ref outputs "out"))
169 (bin (string-append out "/bin"))
170 (share (string-append out "/share/librecad")))
172 (install-file "unix/librecad" bin)
174 (copy-recursively "unix/resources" share))
176 ;; Ensure that icons are found at runtime
177 (add-after 'install 'wrap-executable
178 (lambda* (#:key inputs outputs #:allow-other-keys)
179 (let* ((out (assoc-ref outputs "out"))
180 (qt '("qtbase" "qtsvg")))
181 (wrap-program (string-append out "/bin/librecad")
182 `("QT_PLUGIN_PATH" ":" prefix
183 ,(map (lambda (label)
184 (string-append (assoc-ref inputs label)
185 "/lib/qt5/plugins/"))
190 ("muparser" ,muparser)
191 ("freetype" ,freetype)
195 `(("pkg-config" ,pkg-config)
197 (home-page "https://librecad.org/")
198 (synopsis "Computer-aided design (CAD) application")
200 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
202 (license license:gpl2)))
204 (define-public geda-gaf
211 "http://ftp.geda-project.org/geda-gaf/stable/v"
212 (version-major+minor version) "/"
213 version "/geda-gaf-" version ".tar.gz"))
216 "06ivgarvwbzjz2wigxzzkm8iszldi2p6x3a6jnlczjyrz4csddsy"))))
217 (build-system gnu-build-system)
220 (modify-phases %standard-phases
221 ;; tests require a writable HOME
222 (add-before 'check 'set-home
224 (setenv "HOME" (getenv "TMPDIR"))
226 (add-after 'unpack 'disable-failing-tests
228 (substitute* "xorn/tests/Makefile.in"
230 ;; This test returns its correct result in an unexpected order.
231 (substitute* "libgeda/scheme/unit-tests/t0402-config.scm"
232 (("\\(begin-config-test 'config-keys" m)
233 (string-append "#;" m)))
236 (let ((pcb (assoc-ref %build-inputs "pcb")))
237 (list (string-append "--with-pcb-datadir=" pcb "/share")
238 (string-append "--with-pcb-lib-path="
239 pcb "/share/pcb/pcblib-newlib:"
240 pcb "/share/pcb/newlib")))))
246 ("shared-mime-info" ,shared-mime-info)
249 ("python" ,python-2))) ; for xorn
251 `(("pkg-config" ,pkg-config)
252 ("desktop-file-utils" ,desktop-file-utils)
253 ("perl" ,perl))) ; for tests
254 (home-page "http://geda-project.org/")
255 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
257 "Gaf stands for “gschem and friends”. It is a subset of the entire tool
258 suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
259 which currently includes: gschem, a schematic capture program; gnetlist, a
260 netlist generation program; gsymcheck, a syntax checker for schematic symbols;
261 gattrib, a spreadsheet programm that manipulates the properties of symbols of
262 a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
263 tool to forward annotation from your schematic to layout using PCB; some minor
265 (license license:gpl2+)))
267 (define-public lepton-eda
268 ;; This is a fork of gEDA/gaf started in late 2016. One of its goal is to
269 ;; keep and to extend Guile support.
273 (version "1.9.11-20200604")
274 (home-page "https://github.com/lepton-eda/lepton-eda")
277 (uri (git-reference (url home-page) (commit version)))
280 "091y8h7wcr9smwhb1wf12sj27n5jrannbj3y6qq3q2gwiifiz8sd"))
281 (file-name (git-file-name name version))))
283 `(("autoconf" ,autoconf)
284 ("automake" ,automake)
285 ("desktop-file-utils" ,desktop-file-utils)
287 ("gettext" ,gettext-minimal)
291 ,@(package-native-inputs geda-gaf)))
296 ("shared-mime-info" ,shared-mime-info)
300 (substitute-keyword-arguments (package-arguments geda-gaf)
301 ((#:configure-flags flags ''())
302 ;; When running "make", the POT files are built with the build time as
303 ;; their "POT-Creation-Date". Later on, "make" notices that .pot
304 ;; files were updated and goes on to run "msgmerge"; as a result, the
305 ;; non-deterministic POT-Creation-Date finds its way into .po files,
306 ;; and then in .gmo files. To avoid that, simply make sure 'msgmerge'
307 ;; never runs. See <https://bugs.debian.org/792687>.
308 `(cons "ac_cv_path_MSGMERGE=true" ,flags))
309 ((#:phases phases '%standard-phases)
310 `(modify-phases %standard-phases
311 (add-before 'bootstrap 'prepare
313 ;; Some of the scripts there are invoked by autogen.sh.
314 (for-each patch-shebang (find-files "build-tools"))
316 ;; Make sure 'msgmerge' can modify the PO files.
317 (for-each (lambda (po)
319 (find-files "." "\\.po$"))
321 ;; This would normally be created by invoking 'git', but it
322 ;; doesn't work here.
323 (call-with-output-file "version.h"
325 (format port "#define PACKAGE_DATE_VERSION \"~a\"~%"
326 ,(string-drop version
327 (+ 1 (string-index version #\-))))
328 (format port "#define PACKAGE_DOTTED_VERSION \"~a\"~%"
329 ,(string-take version
330 (string-index version #\-)))
331 (format port "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%")))
333 (add-after 'install 'compile-scheme-files
334 (lambda* (#:key outputs #:allow-other-keys)
335 (invoke "make" "precompile")
336 (for-each (lambda (program)
337 (wrap-program program
338 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
339 (,(string-append (assoc-ref outputs "out")
340 "/share/lepton-eda/ccache/")))))
341 (find-files (string-append (assoc-ref outputs "out") "/bin")
345 "Lepton EDA ia an @dfn{electronic design automation} (EDA) tool set
346 forked from gEDA/gaf in late 2016. EDA tools are used for electrical circuit
347 design, schematic capture, simulation, prototyping, and production. Lepton
348 EDA includes tools for schematic capture, attribute management, bill of
349 materials (BOM) generation, netlisting into over 20 netlist formats, analog
350 and digital simulation, and printed circuit board (PCB) layout, and many other
359 (uri (string-append "mirror://sourceforge/pcb/pcb/pcb-" version
360 "/pcb-" version ".tar.gz"))
363 "1a7rilp75faidny0r4fdwdxkflyrqp6svxv9lbg7h868293962iz"))))
364 (build-system gnu-build-system)
367 (modify-phases %standard-phases
368 (add-after 'unpack 'use-wish8.6
370 (substitute* "configure"
371 (("wish85") "wish8.6"))
373 ;; It checks for "xhost", which we don't have. This shouldn't
374 ;; matter, because the test is supposed to be skipped, but it causes
375 ;; "run_tests.sh" (and thus the "check" phase) to fail.
376 (add-after 'unpack 'fix-check-for-display
378 (substitute* "tests/run_tests.sh"
379 (("have_display=no") "have_display=yes"))
381 (add-after 'install 'wrap
382 (lambda* (#:key inputs outputs #:allow-other-keys)
383 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
384 ;; fix of the mesa package we wrap the pcb executable such that
385 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
386 (let* ((out (assoc-ref outputs "out"))
387 (path (string-append (assoc-ref inputs "udev") "/lib")))
388 (wrap-program (string-append out "/bin/pcb")
389 `("LD_LIBRARY_PATH" ":" prefix (,path))))
391 (add-before 'check 'pre-check
394 (setenv "DISPLAY" ":1")
399 ("udev" ,eudev) ;FIXME: required by mesa
403 ("gtkglext" ,gtkglext)
404 ("shared-mime-info" ,shared-mime-info)
407 `(("pkg-config" ,pkg-config)
408 ("intltool" ,intltool)
410 ("desktop-file-utils" ,desktop-file-utils)
413 ("imagemagick" ,imagemagick)
415 ("ghostscript" ,ghostscript)
416 ("xvfb" ,xorg-server-for-tests)))
417 (home-page "http://pcb.geda-project.org/")
418 (synopsis "Design printed circuit board layouts")
420 "GNU PCB is an interactive tool for editing printed circuit board
421 layouts. It features a rats-nest implementation, schematic/netlist import,
422 and design rule checking. It also includes an autorouter and a trace
423 optimizer; and it can produce photorealistic and design review images.")
424 (license license:gpl2+)))
426 (define-public pcb-rnd
427 (package (inherit pcb)
432 (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/"
433 "pcb-rnd-" version ".tar.gz"))
436 "0j650498d87b4xsggzc0xlk73k0hhj43wfy45qz2lcn0xc3bks1m"))))
438 `(#:tests? #f ; no check target
440 (modify-phases %standard-phases
441 (add-after 'unpack 'cc-is-gcc
442 (lambda _ (setenv "CC" "gcc") #t))
444 ;; The configure script doesn't tolerate most of our configure flags.
445 (lambda* (#:key outputs #:allow-other-keys)
446 (invoke "sh" "configure"
447 (string-append "--prefix="
448 (assoc-ref outputs "out"))))))))
449 (home-page "http://repo.hu/projects/pcb-rnd/")
450 (description "PCB RND is a fork of the GNU PCB circuit board editing tool
451 featuring various improvements and bug fixes.")))
453 (define-public fastcap
456 (version "2.0-18Sep92")
458 (method url-fetch/tarbomb)
459 (uri (string-append "http://www.rle.mit.edu/cpg/codes/"
460 name "-" version ".tgz"))
463 "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k"))
465 ;; Remove a non-free file.
467 (delete-file "doc/psfig.sty")
469 (patches (search-patches "fastcap-mulSetup.patch"
470 "fastcap-mulGlobal.patch"))))
471 (build-system gnu-build-system)
473 ;; FIXME: with texlive-tiny citation references are rendered as question
474 ;; marks. During the build warnings like these are printed:
475 ;; LaTeX Warning: Citation `nabors91' on page 2 undefined on input line 3.
476 `(("texlive" ,(texlive-union (list texlive-fonts-amsfonts)))
477 ("ghostscript" ,ghostscript)))
479 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
481 #:tests? #f ;; no tests-suite
482 #:modules ((srfi srfi-1)
483 ,@%gnu-build-system-modules)
485 (modify-phases %standard-phases
486 (add-after 'build 'make-doc
488 (invoke "make" "CC=gcc" "RM=rm" "SHELL=sh" "manual")))
489 (add-before 'make-doc 'fix-doc
491 (substitute* "doc/Makefile" (("/bin/rm") (which "rm")))
492 (substitute* (find-files "doc" "\\.tex")
493 (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}"
495 (string-append "\\includegraphics[scale=" scale "]{"
497 (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}"
499 (string-append "\\includegraphics[width=" width "]{"
501 (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}"
503 (string-append "\\includegraphics[height=" height "]{"
505 (("\\\\psfig\\{figure=([^,]*)\\}" all file)
506 (string-append "\\includegraphics{" file "}")))
507 (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex")
508 (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}"
510 (string-append "\\documentclass[" options "]{"
512 "\\usepackage{graphicx}\n"
513 "\\usepackage{robinspace}"))
514 (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all)
515 (string-append "%" all))
516 (("\\\\setstretch\\{.*\\}" all)
517 (string-append "%" all)))
520 (add-before 'install 'clean-bin
522 (delete-file (string-append (getcwd) "/bin/README"))
524 (add-before 'install 'make-pdf
526 (setenv "HOME" "/tmp") ; FIXME: for texlive font cache
527 (with-directory-excursion "doc"
529 (for-each (lambda (file)
530 (invoke "dvips" file "-o"))
531 (find-files "." "\\.dvi"))
532 (for-each (lambda (file)
533 (invoke "ps2pdf" file))
534 '("mtt.ps" "ug.ps" "tcad.ps"))
535 (invoke "make" "clean")))))
537 (lambda* (#:key outputs #:allow-other-keys)
538 (let* ((out (assoc-ref outputs "out"))
539 (data (string-append out "/share"))
540 (bin (string-append out "/bin"))
541 (doc (string-append data "/doc/" ,name "-" ,version))
542 (examples (string-append doc "/examples")))
543 (with-directory-excursion "bin"
544 (for-each (lambda (f)
545 (install-file f bin))
546 (find-files "." ".*")))
547 (copy-recursively "doc" doc)
548 (copy-recursively "examples" examples)
550 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
551 (synopsis "Multipole-accelerated capacitance extraction program")
553 "Fastcap is a capacitance extraction program based on a
554 multipole-accelerated algorithm.")
555 (license (license:non-copyleft #f "See fastcap.c."))))
557 (define-public fasthenry
560 (version "3.0-12Nov96")
563 (file-name (string-append name "-" version ".tar.gz"))
565 "http://www.rle.mit.edu/cpg/codes/" name
566 "-" version ".tar.z"))
568 (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
569 (patches (search-patches "fasthenry-spAllocate.patch"
570 "fasthenry-spBuild.patch"
571 "fasthenry-spUtils.patch"
572 "fasthenry-spSolve.patch"
573 "fasthenry-spFactor.patch"))))
574 (build-system gnu-build-system)
576 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
578 #:tests? #f ;; no tests-suite
579 #:modules ((srfi srfi-1)
580 ,@%gnu-build-system-modules)
582 (modify-phases %standard-phases
585 (lambda* (#:key outputs #:allow-other-keys)
586 (let* ((out (assoc-ref outputs "out"))
587 (data (string-append out "/share"))
588 (bin (string-append out "/bin"))
589 (doc (string-append data "/doc/" ,name "-" ,version))
590 (examples (string-append doc "/examples")))
591 (with-directory-excursion "bin"
592 (for-each (lambda (f)
593 (install-file f bin))
594 (find-files "." ".*")))
595 (copy-recursively "doc" doc)
596 (copy-recursively "examples" examples)
598 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
599 (synopsis "Multipole-accelerated inductance analysis program")
601 "Fasthenry is an inductance extraction program based on a
602 multipole-accelerated algorithm.")
603 (license (license:non-copyleft #f "See induct.c."))))
605 (define-public fritzing
612 (url "https://github.com/fritzing/fritzing-app")
614 (file-name (git-file-name name version))
617 "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
618 (build-system gnu-build-system)
621 (modify-phases %standard-phases
623 (lambda* (#:key inputs outputs #:allow-other-keys)
624 (copy-recursively (assoc-ref inputs "fritzing-parts-db")
626 ;; Make compatible with libgit2 > 0.24
627 (substitute* "src/version/partschecker.cpp"
628 (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
629 "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
631 ;; Use system libgit2 and boost.
632 (substitute* "phoenix.pro"
633 (("^LIBGIT2INCLUDE =.*")
634 (string-append "LIBGIT2INCLUDE="
635 (assoc-ref inputs "libgit2") "/include\n"))
636 (("^ LIBGIT2LIB =.*")
637 (string-append " LIBGIT2LIB="
638 (assoc-ref inputs "libgit2") "/lib\n")))
639 ;; This file checks for old versions of Boost, insisting on
640 ;; having us download the boost sources and placing them in the
642 (substitute* "pri/utils.pri"
643 (("error\\(") "message("))
645 (let ((out (assoc-ref outputs "out")))
647 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib")
648 (string-append "PREFIX=" out)
652 ("qtserialport" ,qtserialport)
661 (url "https://github.com/fritzing/fritzing-parts")
663 (file-name (git-file-name "fritzing-parts" version))
666 "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
667 (home-page "https://fritzing.org")
668 (synopsis "Electronic circuit design")
670 "The Fritzing application is @dfn{Electronic Design Automation} (EDA)
671 software with a low entry barrier, suited for the needs of makers and
672 hobbyists. It offers a unique real-life \"breadboard\" view, and a parts
673 library with many commonly used high-level components. Fritzing makes it very
674 easy to communicate about circuits, as well as to turn them into PCB layouts
675 ready for production.")
676 ;; Documentation and parts are released under CC-BY-SA 3.0; source code is
677 ;; released under GPLv3+.
678 (license (list license:gpl3+ license:cc-by-sa3.0))))
686 (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-"
687 version "/gerbv-" version ".tar.gz"))
690 "1d2k43k7i4yvbpi4sw1263a8d0q98z2n7aqhmpinpkih8a681vn5"))))
691 (build-system gnu-build-system)
693 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
694 ("desktop-file-utils" ,desktop-file-utils)
695 ("pkg-config" ,pkg-config)))
699 (home-page "http://gerbv.geda-project.org/")
700 (synopsis "Gerber file viewer")
702 "Gerbv is a viewer for files in the Gerber format (RS-274X only), which
703 is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets
704 you load several files on top of each other, do measurements on the displayed
705 image, etc. Besides viewing Gerbers, you may also view Excellon drill files
706 as well as pick-place files.")
707 (license license:gpl2+)))
709 (define-public translate2geda
710 ;; There has been no formal release yet.
711 (let ((commit "4c19e7eefa338cea8f1ee999ea8b37f8d0698169")
714 (name "translate2geda")
715 (version (git-version "0" revision commit))
719 (url "https://github.com/erichVK5/translate2geda")
721 (file-name (git-file-name name version))
724 "1h062bbpw8nk0jamkya1k4lsgaia796jyviiz2gkdi6k1bxhwgpa"))))
725 (build-system ant-build-system)
727 `(#:tests? #f ; there are no tests
728 #:jar-name "translate2geda.jar"
730 #:main-class "translate2geda"
732 (modify-phases %standard-phases
733 (add-after 'install 'install-bin
734 (lambda* (#:key inputs outputs #:allow-other-keys)
735 (let* ((out (assoc-ref outputs "out"))
736 (bin (string-append out "/bin"))
737 (wrapper (string-append bin "/translate2geda")))
739 (with-output-to-file wrapper
741 (format #t "#!/bin/sh~%exec ~a -jar ~a/share/java/translate2geda.jar"
742 (which "java") out)))
743 (chmod wrapper #o555))
745 (home-page "https://github.com/erichVK5/translate2geda")
746 (synopsis "Utility for converting symbol and footprint formats to gEDA")
748 "This package provides a utility for converting Kicad (@file{.mod},
749 @file{.lib}), Eagle (@file{.lbr}), gerber (@file{.gbr}, etc..),
750 BXL (@file{.bxl}), IBIS (@file{.ibs}), symdef, LT-Spice (@file{.asc}),
751 QUCS (@file{.sch}), and BSDL (@file{.bsd}) symbols and footprints and EggBot
753 (license license:gpl2+))))
755 (define-public libfive
756 (let ((commit "6e39254e57c179459bb929df49ae96a6017a0ed6")
760 (version (git-version "0" revision commit))
764 (url "https://github.com/libfive/libfive")
768 "0ryv2hcbrwqc087w7rrs4a2irkcpmqync00g4dh8n7jn10w2jkim"))
769 (file-name (git-file-name name version))))
770 (build-system cmake-build-system)
772 `(#:test-target "libfive-test"
774 (modify-phases %standard-phases
775 (add-after 'unpack 'remove-native-compilation
777 (substitute* "CMakeLists.txt" (("-march=native") ""))
780 `(("pkg-config" ,pkg-config)))
786 ("guile" ,guile-2.2)))
787 (home-page "https://libfive.com")
788 (synopsis "Tool for programmatic computer-aided design")
790 "Libfive is a tool for programmatic computer-aided design (CAD). In
791 libfive, solid models are defined as Scheme scripts, and there are no opaque
792 function calls into the geometry kernel: everything is visible to the user.
793 Even fundamental, primitive shapes are represented as code in the user-level
795 (license (list license:mpl2.0 ;library
796 license:gpl2+))))) ;Guile bindings and GUI
798 (define-public inspekt3d
799 (let ((commit "703f52ccbfedad2bf5240bf8183d1b573c9d54ef")
803 (version (git-version "0" revision commit))
807 (url "https://gitlab.com/kavalogic-inc/inspekt3d.git")
809 (file-name (git-file-name name version))
812 "0lan6930g5a9z4ack9jj0zdd0mb2s6q2xzpiwcjdc3pvl9b1nbw4"))))
813 (build-system gnu-build-system)
816 (modify-phases %standard-phases
817 (add-after 'unpack 'patch-libfive-guile-location
818 (lambda* (#:key inputs #:allow-other-keys)
819 (substitute* "inspekt3d/library.scm"
822 (assoc-ref inputs "libfive")
823 "/lib/libfive-guile")))
826 `(("autoconf" ,autoconf)
827 ("automake" ,automake)
828 ("pkg-config" ,pkg-config)))
831 ("guile" ,guile-2.2)))
833 `(("libfive" ,libfive)
834 ("guile-opengl" ,guile-opengl)))
835 (home-page "https://gitlab.com/kavalogic-inc/inspekt3d/")
836 (synopsis "Lightweight 3D viewer for Libfive written in Guile Scheme")
838 "Inspekt3d is a lightweight 3D viewer for Libfive written in Guile Scheme.
839 The viewer can be used interactively with a REPL (for example Geiser in
841 (license license:gpl3+))))
843 ;; TODO Add doc https://gitlab.com/kicad/services/kicad-doc/-/tree/master
852 (url "https://gitlab.com/kicad/code/kicad.git")
855 (base32 "1pa3z0h0679jmgxlzc833h6q85b5paxdp69kf2h93vkaryj58622"))
856 (file-name (git-file-name name version))))
857 (build-system cmake-build-system)
859 `(#:out-of-source? #t
860 #:tests? #f ; no tests
861 #:build-type "Release"
863 (list "-DKICAD_SCRIPTING_PYTHON3=ON"
864 "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON"
865 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE")
867 (modify-phases %standard-phases
868 (add-after 'install 'install-translations
869 (lambda* (#:key inputs outputs #:allow-other-keys)
870 (copy-recursively (assoc-ref inputs "kicad-i18n")
871 (assoc-ref outputs "out"))
873 (add-after 'install 'wrap-program
874 ;; Ensure correct Python at runtime.
875 (lambda* (#:key inputs outputs #:allow-other-keys)
876 (let* ((out (assoc-ref outputs "out"))
877 (python (assoc-ref inputs "python"))
878 (file (string-append out "/bin/kicad"))
882 ,(version-major+minor
883 (package-version python))
885 (getenv "PYTHONPATH"))))
887 `("PYTHONPATH" ":" prefix (,path))
889 (,(string-append python "/bin:")))))
892 (list (search-path-specification
893 (variable "KICAD_TEMPLATE_DIR")
894 (files '("share/kicad/template")))
895 (search-path-specification
896 (variable "KICAD_SYMBOL_DIR") ; symbol path
897 (files '("share/kicad/library")))
898 (search-path-specification
899 (variable "KISYSMOD") ; footprint path
900 (files '("share/kicad/modules")))
901 (search-path-specification
902 (variable "KISYS3DMOD") ; 3D model path
903 (files '("share/kicad/modules/packages3d")))))
906 ("desktop-file-utils" ,desktop-file-utils)
907 ("gettext" ,gettext-minimal)
908 ("kicad-i18n" ,kicad-i18n)
909 ("pkg-config" ,pkg-config)
917 ("hicolor-icon-theme" ,hicolor-icon-theme)
918 ("libngspice" ,libngspice)
921 ("opencascade-oce" ,opencascade-oce)
923 ("python" ,python-wrapper)
924 ("wxwidgets" ,wxwidgets)
925 ("wxpython" ,python-wxpython)))
926 (home-page "https://kicad-pcb.org/")
927 (synopsis "Electronics Design Automation Suite")
928 (description "Kicad is a program for the formation of printed circuit
929 boards and electrical circuits. The software has a number of programs that
930 perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing
931 electrical diagrams), gerbview (viewing Gerber files) and others.")
932 (license license:gpl3+)))
937 (version (package-version kicad))
941 (url "https://gitlab.com/kicad/code/kicad-i18n.git")
943 (file-name (git-file-name name version))
946 "0qryi8xjm23ka363zfl7bbga0v5c31fr3d4nyxp3m168vkv9zhha"))))
947 (build-system cmake-build-system)
950 (modify-phases %standard-phases
954 `(("gettext" ,gettext-minimal)))
955 (home-page (package-home-page kicad))
956 (synopsis "KiCad GUI translations")
957 (description "This package contains the po files that are used for the GUI
958 translations for KiCad.")
959 (license license:gpl3+)))
961 (define-public kicad-i18l
962 (deprecated-package "kicad-i18l" kicad-i18n))
964 (define-public kicad-symbols
966 (name "kicad-symbols")
967 (version (package-version kicad))
971 (url "https://github.com/KiCad/kicad-symbols")
973 (file-name (git-file-name name version))
976 "12w3rdy085drlikkpb27n9ni7cyg9l0pqy7hnr86cxjcw3l5wcx6"))))
977 (build-system cmake-build-system)
979 `(#:tests? #f)) ; no tests exist
980 (home-page (package-home-page kicad))
981 (synopsis "Official KiCad schematic symbol libraries")
982 (description "This package contains the official KiCad schematic symbol
984 ;; TODO: Exception: "To the extent that the creation of electronic designs
985 ;; that use 'Licensed Material' can be considered to be 'Adapted Material',
986 ;; then the copyright holder waives article 3 of the license with respect to
987 ;; these designs and any generated files which use data provided as part of
988 ;; the 'Licensed Material'."
989 ;; See <https://github.com/KiCad/kicad-symbols/blob/master/LICENSE.md>.
990 (license license:cc-by-sa4.0)))
992 (define-public kicad-footprints
994 (inherit kicad-symbols)
995 (name "kicad-footprints")
996 (version (package-version kicad))
1000 (url "https://github.com/KiCad/kicad-footprints")
1002 (file-name (git-file-name name version))
1005 "1kmf91a5mmvj9izrv40mkaw1w36yjgn8daczd9rq2wlmd0rdp1zx"))))
1006 (synopsis "Official KiCad footprint libraries")
1007 (description "This package contains the official KiCad footprint libraries.")))
1009 (define-public kicad-packages3d
1011 (inherit kicad-symbols)
1012 (name "kicad-packages3d")
1013 (version (package-version kicad))
1017 (url "https://github.com/KiCad/kicad-packages3d")
1019 (file-name (git-file-name name version))
1022 "0b9jglf77fy0n0r8xs4yqkv6zvipyfvp0z5dnqlzp32csy5aqpi1"))))
1023 (synopsis "Official KiCad 3D model libraries")
1024 (description "This package contains the official KiCad 3D model libraries.")))
1026 (define-public kicad-templates
1028 (inherit kicad-symbols)
1029 (name "kicad-templates")
1030 (version (package-version kicad))
1034 (url "https://github.com/KiCad/kicad-templates")
1036 (file-name (git-file-name name version))
1039 "1hppcsrkn4dk6ggby6ckh0q65qxkywrbyxa4lwpaf7pxjyv498xg"))))
1040 (synopsis "Official KiCad project and worksheet templates")
1041 (description "This package contains the official KiCad project and
1042 worksheet templates.")))
1044 (define-public linsmith
1051 "mirror://sourceforge/linsmith/linsmith/linsmith-"
1052 version "/linsmith-" version ".tar.gz"))
1055 "13qj7n9826qc9shkkgd1p6vcpj78v4h9d67wbg45prg7rbnzkzds"))))
1056 (build-system gnu-build-system)
1058 `(("pkg-config" ,pkg-config)
1060 ("libgnome" ,libgnomeui)))
1061 (home-page "https://jcoppens.com/soft/linsmith/index.en.php")
1062 (synopsis "Smith Charting program")
1063 (description "LinSmith is a Smith Charting program, mainly designed for
1064 educational use. As such, there is an emphasis on capabilities that improve
1065 the 'showing the effect of'-style of operation.")
1066 (license license:gpl2+)))
1075 (uri (string-append "https://www.libvolk.org/releases/volk-"
1078 (base32 "1pjxz3piwy49njj5y2zk437prwkv9lfs5g48577jj3kcsg766vi3"))))
1079 (build-system cmake-build-system)
1082 (modify-phases %standard-phases
1083 (add-after 'install 'wrap-pythonpath
1084 (lambda* (#:key inputs outputs #:allow-other-keys)
1085 (let* ((out (assoc-ref outputs "out"))
1086 (python (assoc-ref inputs "python"))
1087 (file (string-append out "/bin/volk_modtool"))
1088 (path (string-append
1091 ,(version-major+minor
1092 (package-version python))
1094 (getenv "PYTHONPATH"))))
1096 `("PYTHONPATH" ":" prefix (,path))
1098 (,(string-append python "/bin:")))))
1102 ("python" ,python-wrapper)
1103 ("python-mako" ,python-mako)))
1104 (home-page "https://www.libvolk.org/")
1105 (synopsis "Vector-Optimized Library of Kernels")
1107 "@acronym{VOLK, Vector-Optimized Library of Kernels} contains procedures
1108 with machine-specific optimizations for mathematical functions. It also
1109 provides a machine-independent interface to select the best such procedures to
1110 use on a given system.")
1111 (license license:gpl3+)))
1113 (define-public libredwg
1120 (uri (string-append "mirror://gnu/libredwg/libredwg-"
1123 (base32 "1vd7ii32k5447z7k4w9s005hv1ffpj6dyf1w40x6c53qksrblny2"))))
1124 (build-system gnu-build-system)
1126 `(#:configure-flags '("--disable-bindings")))
1128 `(("libxml2" ,libxml2)
1129 ("parallel" ,parallel)
1130 ("pkg-config" ,pkg-config)
1132 ("python-libxml2" ,python-libxml2)))
1134 `(("pcre2" ,pcre2)))
1135 (home-page "https://www.gnu.org/software/libredwg/")
1136 (synopsis "C library to handle DWG (CAD-related) files")
1138 "GNU LibreDWG is a C library to handle DWG files. It aims to be a free
1139 replacement for the OpenDWG libraries.")
1140 (license license:gpl3+)))
1142 (define-public minicom
1150 (url "https://salsa.debian.org/minicom-team/minicom.git")
1151 (commit (string-append "v" version))))
1153 (base32 "0f36wv015zpz1x895qv0z6marlynzyh0d5mfkyd7lfyy2xd1i2w0"))
1154 (file-name (git-file-name name version))))
1155 (build-system gnu-build-system)
1157 `(#:configure-flags '("--enable-lock-dir=/var/lock")
1159 (modify-phases %standard-phases
1161 ;; autogen.sh needlessly hard-codes aclocal-1.14.
1163 (invoke "autoreconf" "-vif")
1165 (add-before 'configure 'patch-lock-check
1167 (substitute* "configure"
1168 (("test -d [$]UUCPLOCK") "true"))
1171 `(("autoconf" ,autoconf)
1172 ("automake" ,automake)
1173 ("gettext" ,gettext-minimal)
1174 ("pkg-config" ,pkg-config)))
1176 `(("ncurses" ,ncurses)))
1177 (home-page "https://salsa.debian.org/minicom-team/minicom")
1178 (synopsis "Serial terminal emulator")
1179 (description "@code{minicom} is a serial terminal emulator.")
1180 (license license:gpl2+)))
1182 (define-public harminv
1189 (string-append "https://github.com/stevengj/harminv/"
1190 "releases/download/v" version "/"
1191 name "-" version ".tar.gz"))
1194 "0w1n4d249vlpda0hi6z1v13qp21vlbp3ykn0m8qg4rd5132j7fg1"))))
1195 (build-system gnu-build-system)
1197 `(#:configure-flags '("--enable-shared")
1199 (modify-phases %standard-phases
1200 (add-before 'configure 'fix-tests
1202 (substitute* "./sines-test.sh"
1203 ; change test frequency range - default fails
1204 (("0\\.15") "0.16"))
1207 `(("fortran" ,gfortran)))
1209 `(("lapack" ,lapack)))
1210 (home-page "https://github.com/stevengj/harminv")
1211 (synopsis "Harmonic inversion solver")
1213 "Harminv is a free program (and accompanying library) to solve the problem of
1214 harmonic inversion — given a discrete-time, finite-length signal that consists of a sum
1215 of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
1216 determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
1217 (license license:gpl2+)))
1219 (define-public guile-libctl
1221 (name "guile-libctl")
1227 "https://github.com/NanoComp/libctl/releases/download/v"
1228 version "/libctl-" version ".tar.gz"))
1231 "0x8r56lpfq83kfbq28vr25icl19xpfd6fjrxzcpdmv30l9pash83"))))
1232 (build-system gnu-build-system)
1234 `(#:configure-flags '("--enable-shared")))
1236 `(("fortran" ,gfortran)))
1238 `(("guile" ,guile-2.2)))
1239 (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl")
1240 (synopsis "Flexible control files implementation for scientific simulations")
1242 "Libctl is a Guile-based library implementing flexible control files
1243 for scientific simulations.")
1244 (license license:gpl2+)))
1254 "https://github.com/NanoComp/mpb/releases/download/v"
1255 version "/mpb-" version ".tar.gz"))
1258 "1jgrb7dd6qs6j6y1gnxmdgrh79l2bvqa6nk60a4pw1annsks4brd"))))
1259 (build-system gnu-build-system)
1262 (list (string-append "--with-libctl="
1263 (assoc-ref %build-inputs "libctl")
1265 "--enable-shared")))
1267 `(("fortran" ,gfortran)
1268 ("pkg-config" ,pkg-config)
1273 ("guile" ,guile-2.2)
1276 ("libctl" ,guile-libctl)
1277 ("readline" ,readline)
1279 (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands")
1280 (synopsis "Computes band structures and electromagnetic modes of dielectric
1283 "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes)
1284 of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
1285 fully-vectorial and three-dimensional methods.")
1286 (license license:gpl2+)))
1296 "https://github.com/NanoComp/meep/releases/download/v"
1297 version "/meep-" version ".tar.gz"))
1300 "14zyxmm3p80j5fz5b89sl7hgkgcisqjny5hjh4pi274ziqjqz8bm"))))
1301 (build-system gnu-build-system)
1304 (list (string-append "--with-libctl="
1305 (assoc-ref %build-inputs "libctl")
1308 `(("fortran" ,gfortran)
1309 ("pkg-config" ,pkg-config)
1314 ("guile" ,guile-2.2)
1315 ("harminv" ,harminv)
1318 ("libctl" ,guile-libctl)
1321 (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep")
1322 (synopsis "Finite-difference time-domain (FDTD) simulation software")
1324 "Meep is a finite-difference time-domain (FDTD) simulation software package
1325 developed at MIT to model electromagnetic systems.")
1326 (license license:gpl2+)))
1336 "mirror://sourceforge/mot-adms/adms-source/"
1337 (version-major+minor version) "/adms-" version ".tar.gz"))
1340 "1rn98l6jxcjhi6ai5f7p588khra9z80m0m0lql4n4sb7773fh1vk"))))
1341 (build-system gnu-build-system)
1345 (home-page "https://sourceforge.net/projects/mot-adms")
1346 (synopsis "Automatic device model synthesizer")
1348 "ADMS is a code generator that converts electrical compact device models
1349 specified in high-level description language into ready-to-compile C code for
1350 the API of spice simulators. Based on transformations specified in XML
1351 language, ADMS transforms Verilog-AMS code into other target languages.")
1352 (license license:gpl3)))
1354 (define-public capstone
1361 (url "https://github.com/aquynh/capstone")
1363 (file-name (git-file-name name version))
1366 "0dgf82kxj4rs45d6s8sr984c38sll1n5scpypjlyh21gh2yl4qfw"))))
1367 (build-system gnu-build-system)
1370 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1373 (modify-phases %standard-phases
1374 (delete 'configure) ; no configure script
1375 ;; cstool's Makefile ‘+=’s LDFLAGS, so we cannot pass it as a make flag.
1376 (add-before 'build 'fix-cstool-ldflags
1377 (lambda* (#:key outputs #:allow-other-keys)
1378 (setenv "LDFLAGS" (string-append "-Wl,-rpath="
1379 (assoc-ref outputs "out") "/lib"))
1381 (home-page "https://www.capstone-engine.org")
1382 (synopsis "Lightweight multi-platform, multi-architecture disassembly framework")
1384 "Capstone is a lightweight multi-platform, multi-architecture disassembly
1385 framework. Capstone can disassemble machine code for many supported architectures
1386 such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and xcore. It provides
1387 bindings for Python, Java, OCaml and more.")
1388 (license license:bsd-3)))
1390 ;; FIXME: This package has a timestamp embedded in
1391 ;; lib/python3.5/site-packages/capstone/__pycache__/__iti__.cpython-35.pyc
1392 (define-public python-capstone
1395 (name "python-capstone")
1397 `(("capstone" ,capstone)))
1398 (build-system python-build-system)
1401 (modify-phases %standard-phases
1402 (add-after 'unpack 'chdir-and-fix-setup-py
1404 (chdir "bindings/python")
1405 ;; Do not build the library again, because we already have it.
1406 (substitute* "setup.py" ((".* build_libraries.*") ""))
1407 ;; This substitution tells python-capstone where to find the
1409 (substitute* "capstone/__init__.py"
1410 (("pkg_resources.resource_filename.*")
1411 (string-append "'" (assoc-ref %build-inputs "capstone") "/lib',\n")))
1414 (define-public python2-capstone
1415 (package-with-python2 python-capstone))
1417 (define-public radare2
1424 (url "https://github.com/radareorg/radare2")
1428 "0gwdnrnk7wdgkajp2qwg4fyplh7nsbmf01bzx07px6xmiscd9z2s"))
1429 (file-name (git-file-name name version))))
1430 (build-system gnu-build-system)
1432 '(#:tests? #f ; tests require git and network access
1434 (modify-phases %standard-phases
1435 (add-before 'configure 'mklibdir
1436 (lambda* (#:key inputs outputs #:allow-other-keys)
1437 (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))
1440 (list "--with-openssl"
1442 "--with-syscapstone"
1448 ;; TODO: Add gmp and libzip and make the build system actually find them.
1450 `(("capstone" ,capstone)
1452 ("openssl" ,openssl)
1455 `(("pkg-config" ,pkg-config)))
1457 ;; In the Libs: section of r_hash.pc.
1458 `(("xxhash" ,xxhash)))
1459 (home-page "https://radare.org/")
1460 (synopsis "Reverse engineering framework")
1462 "Radare2 is a complete framework for reverse-engineering, debugging, and
1463 analyzing binaries. It is composed of a set of small utilities that can be
1464 used together or independently from the command line.
1466 Radare2 is built around a scriptable disassembler and hexadecimal editor that
1467 support a variety of executable formats for different processors and operating
1468 systems, through multiple back ends for local and remote files and disk
1471 It can also compare (@dfn{diff}) binaries with graphs and extract information
1472 like relocation symbols. It is able to deal with malformed binaries, making
1473 it suitable for security research and analysis.")
1474 (license license:lgpl3)))
1482 (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
1486 "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
1487 (build-system gnu-build-system)
1489 `(#:tests? #f ; no tests
1490 #:make-flags '("all" "asco-mpi")
1492 (modify-phases %standard-phases
1494 (add-before 'build 'fix-paths
1495 (lambda* (#:key inputs #:allow-other-keys)
1496 (let ((coreutils (assoc-ref inputs "coreutils-minimal")))
1497 (substitute* '("errfunc.c" "asco.c")
1499 (string-append coreutils "/bin/cp "))
1501 (string-append coreutils "/bin/nice")))
1502 (substitute* "Makefile"
1503 (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
1505 (replace 'install ; no install target
1506 (lambda* (#:key outputs #:allow-other-keys)
1507 (for-each (lambda (file)
1508 (install-file file (string-append
1509 (assoc-ref outputs "out")
1511 '("asco" "asco-mpi" "asco-test"
1512 "tools/alter/alter" "tools/log/log"))
1515 `(("mpi" ,openmpi)))
1517 `(("coreutils-minimal" ,coreutils-minimal)))
1518 (home-page "http://asco.sourceforge.net/")
1519 (synopsis "SPICE circuit optimizer")
1521 "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
1522 high-performance parallel differential evolution (DE) optimization algorithm.")
1523 (license license:gpl2+)))
1525 (define-public libngspice
1526 ;; Note: The ngspice's build system does not allow us to build both the
1527 ;; library and the executables in one go. Thus, we have two packages.
1528 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>.
1534 (uri (string-append "mirror://sourceforge/ngspice/ng-spice-rework/"
1535 version "/ngspice-" version ".tar.gz"))
1538 "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l"))
1539 (modules '((guix build utils)))
1540 ;; We remove the non-free cider and build without it.
1543 (delete-file-recursively "src/ciderlib")
1544 (delete-file "src/ciderinit")
1545 (substitute* "configure"
1546 (("src/ciderlib/Makefile") "")
1547 (("src/ciderlib/input/Makefile") "")
1548 (("src/ciderlib/support/Makefile") "")
1549 (("src/ciderlib/oned/Makefile") "")
1550 (("src/ciderlib/twod/Makefile") ""))
1552 (build-system gnu-build-system)
1554 `(;; No tests for libngspice exist.
1555 ;; The transient tests for ngspice fail.
1558 (modify-phases %standard-phases
1559 (add-after 'unpack 'patch-timestamps
1561 (substitute* "configure"
1562 (("`date`") "Thu Jan 1 00:00:01 UTC 1970"))
1564 (add-after 'unpack 'delete-program-manuals
1566 (substitute* "man/man1/Makefile.in"
1567 (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1 ngmultidec\\.1")
1570 (add-after 'install 'delete-script-files
1571 (lambda* (#:key outputs #:allow-other-keys)
1572 (delete-file-recursively
1573 (string-append (assoc-ref outputs "out")
1574 "/share/ngspice/scripts")))))
1576 (list "--enable-openmp"
1579 "--with-readline=yes")))
1584 `(("libxaw" ,libxaw)
1586 ("readline" ,readline)))
1587 (home-page "http://ngspice.sourceforge.net/")
1588 (synopsis "Mixed-level/mixed-signal circuit simulator")
1590 "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes
1591 @code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that
1592 provides code modeling support and simulation of digital components through
1593 an embedded event driven algorithm.")
1594 (license (list license:lgpl2.0+ ; code in frontend/numparam
1595 (license:non-copyleft "file:///COPYING") ; spice3 bsd-style
1596 license:public-domain)))) ; xspice
1598 (define-public ngspice
1599 ;; The ngspice executables (see libngpsice above.)
1600 (package (inherit libngspice)
1603 (substitute-keyword-arguments (package-arguments libngspice)
1604 ((#:configure-flags flags)
1605 `(delete "--with-ngshared" ,flags))
1607 `(modify-phases ,phases
1608 (add-after 'unpack 'delete-include-files
1610 (substitute* "src/Makefile.in"
1611 (("^SUBDIRS = misc maths frontend spicelib include/ngspice")
1612 "SUBDIRS = misc maths frontend spicelib"))
1614 (add-after 'install 'delete-cmpp-dlmain
1615 (lambda* (#:key outputs #:allow-other-keys)
1616 (for-each (lambda (file)
1618 (string-append (assoc-ref outputs "out")
1620 '("/bin/cmpp" "/share/ngspice/dlmain.c"))
1622 (delete 'delete-program-manuals)
1623 (delete 'delete-script-files)))))
1625 `(("libngspice" ,libngspice)
1626 ("readline" ,readline)))))
1628 (define trilinos-serial-xyce
1629 ;; Note: This is a Trilinos containing only the packages Xyce needs, so we
1630 ;; keep it private. See
1631 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#248>.
1632 ;; TODO: Remove when we have modular Trilinos packages?
1634 (name "trilinos-serial-xyce")
1637 (origin (method url-fetch)
1638 (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
1639 version "-Source.tar.gz"))
1642 "1zgrcksrcbmyy79mbdv0j4j4sh0chpigxk8vcrrwgaxyxwxxhrvw"))))
1643 (build-system cmake-build-system)
1645 `(#:out-of-source? #t
1647 (modify-phases %standard-phases
1648 ;; Delete unneeded tribits(build system) directory which makes validate-runpath
1650 (add-before 'validate-runpath 'delete-tribits
1651 (lambda* (#:key outputs #:allow-other-keys)
1652 (delete-file-recursively
1653 (string-append (assoc-ref outputs "out")
1654 "/lib/cmake/tribits"))
1657 (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
1658 "-DCMAKE_C_FLAGS=-O3 -fPIC"
1659 "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
1660 "-DTrilinos_ENABLE_NOX=ON"
1661 "-DNOX_ENABLE_LOCA=ON"
1662 "-DTrilinos_ENABLE_EpetraExt=ON"
1663 "-DEpetraExt_BUILD_BTF=ON"
1664 "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
1665 "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
1666 "-DTrilinos_ENABLE_TrilinosCouplings=ON"
1667 "-DTrilinos_ENABLE_Ifpack=ON"
1668 "-DTrilinos_ENABLE_Isorropia=ON"
1669 "-DTrilinos_ENABLE_AztecOO=ON"
1670 "-DTrilinos_ENABLE_Belos=ON"
1671 "-DTrilinos_ENABLE_Teuchos=ON"
1672 "-DTeuchos_ENABLE_COMPLEX=ON"
1673 "-DTrilinos_ENABLE_Amesos=ON"
1674 "-DAmesos_ENABLE_KLU=ON"
1675 "-DAmesos_ENABLE_UMFPACK=ON"
1676 "-DTrilinos_ENABLE_Sacado=ON"
1677 "-DTrilinos_ENABLE_Kokkos=OFF"
1678 "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
1679 "-DTPL_ENABLE_AMD=ON"
1680 "-DTPL_ENABLE_UMFPACK=ON"
1681 "-DTPL_ENABLE_BLAS=ON"
1682 "-DTPL_ENABLE_LAPACK=ON")))
1684 `(("fortran" ,gfortran)
1689 ("suitesparse" ,suitesparse)))
1690 (home-page "https://trilinos.org")
1691 (synopsis "Engineering and scientific problems algorithms")
1693 "The Trilinos Project is an effort to develop algorithms and enabling
1694 technologies within an object-oriented software framework for the solution of
1695 large-scale, complex multi-physics engineering and scientific problems. A
1696 unique design feature of Trilinos is its focus on packages.")
1697 (license (list license:lgpl2.1+
1700 (define-public xyce-serial
1702 (name "xyce-serial")
1705 (origin (method url-fetch)
1706 (uri (string-append "https://archive.org/download/Xyce-"
1707 version "/Xyce-" version ".tar.gz"))
1710 "09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
1711 (build-system gnu-build-system)
1717 (string-append "ARCHDIR="
1718 (assoc-ref %build-inputs "trilinos")))))
1720 `(("bison" ,bison-3.0) ;'configure' fails with Bison 3.4
1722 ("fortran" ,gfortran)))
1725 ("suitesparse" ,suitesparse)
1727 ("trilinos" ,trilinos-serial-xyce)))
1728 (home-page "https://xyce.sandia.gov/")
1729 (synopsis "High-performance analog circuit simulator")
1731 "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
1732 capable of solving extremely large circuit problems by supporting large-scale
1733 parallel computing platforms. It also supports serial execution.")
1734 (license license:gpl3+)))
1736 (define trilinos-parallel-xyce
1737 (package (inherit trilinos-serial-xyce)
1738 (name "trilinos-parallel-xyce")
1740 `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
1741 ((#:configure-flags flags)
1742 `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
1743 "-DTrilinos_ENABLE_Zoltan=ON"
1744 "-DTPL_ENABLE_MPI=ON")
1748 ,@(package-inputs trilinos-serial-xyce)))))
1750 (define-public xyce-parallel
1751 (package (inherit xyce-serial)
1752 (name "xyce-parallel")
1754 `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
1755 ((#:configure-flags flags)
1756 `(list "CXXFLAGS=-O3"
1763 (assoc-ref %build-inputs "trilinos")))))))
1765 `(("mpi" ,openmpi)))
1767 `(("trilinos" ,trilinos-parallel-xyce)
1768 ,@(alist-delete "trilinos"
1769 (package-inputs xyce-serial))))))
1771 (define-public freehdl
1777 (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
1781 "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))
1784 ;; Fix build with GCC 7. Patch taken from Arch Linux:
1785 ;; https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/freehdl
1787 (uri "https://git.archlinux.org/svntogit/community.git\
1788 /plain/trunk/build-fix.patch?h=packages/freehdl\
1789 &id=3bb90d64dfe6883e26083cd1fa96226d0d59175a")
1790 (file-name "freehdl-c++-namespace.patch")
1793 "09df3c70rx81rnhlhry1wpdhji274nx9jb74rfprk06l4739zm08")))))))
1794 (build-system gnu-build-system)
1797 (modify-phases %standard-phases
1798 (add-before 'configure 'patch-pkg-config
1799 (lambda* (#:key inputs #:allow-other-keys)
1800 (substitute* "freehdl/freehdl-config"
1802 (string-append (assoc-ref inputs "pkg-config")
1805 (string-append (assoc-ref inputs "coreutils")
1808 (add-after 'patch-pkg-config 'setenv
1809 (lambda* (#:key inputs #:allow-other-keys)
1810 (setenv "CXX" (string-append (assoc-ref inputs "gcc")
1812 (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
1815 (add-after 'setenv 'patch-gvhdl
1817 (substitute* "v2cc/gvhdl.in"
1818 (("--mode=link") "--mode=link --tag=CXX")
1819 (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
1821 (add-after 'patch-gvhdl 'patch-freehdl-gennodes
1822 (lambda* (#:key inputs #:allow-other-keys)
1823 (substitute* "freehdl/freehdl-gennodes.in"
1825 (string-append (assoc-ref inputs "guile") "/bin/guile"))
1826 (("\\(debug") ";(debug")
1827 (("\\(@ ") "(apply-emit")
1828 (("\\(@@ ") "(apply-mini-format"))
1830 (add-after 'configure 'patch-freehdl-pc
1831 (lambda* (#:key inputs #:allow-other-keys)
1832 (substitute* "freehdl.pc"
1834 (string-append "=" (assoc-ref inputs "gcc-toolchain")
1837 (string-append "=" (assoc-ref inputs "libtool")
1840 (add-after 'install-scripts 'make-wrapper
1841 (lambda* (#:key inputs outputs #:allow-other-keys)
1842 (let ((out (assoc-ref outputs "out")))
1843 ;; 'gvhdl' invokes the C compiler directly, so hard-code its
1845 (wrap-program (string-append out "/bin/gvhdl")
1846 `("CPLUS_INCLUDE_PATH" ":" prefix
1847 (,(string-append (assoc-ref inputs "gcc-toolchain")
1849 `("LIBRARY_PATH" ":" prefix
1850 (,(string-append (assoc-ref inputs "gcc-toolchain")
1853 (,(string-append (assoc-ref inputs "gcc-toolchain")
1855 ,(string-append (assoc-ref inputs "coreutils")
1857 (wrap-program (string-append out "/bin/freehdl-config")
1858 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
1861 `(("coreutils" ,coreutils)
1862 ("gcc-toolchain" ,gcc-toolchain)
1863 ("guile" ,guile-2.2)
1865 ("pkg-config" ,pkg-config)
1866 ("libtool" ,libtool)))
1868 `(("pkg-config-native" ,pkg-config)
1869 ("libtool-native" ,libtool)))
1870 (home-page "http://www.freehdl.seul.org/")
1871 (synopsis "VHDL simulator")
1873 "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
1874 VHDL'93 as well as VHDL'87 standards are supported.")
1875 (license (list license:gpl2+
1876 license:lgpl2.0+)))) ; freehdl's libraries
1879 ;; Qucs 0.0.19 segfaults when using glibc-2.26. Temporarily build from git.
1880 ;; TODO: When qucs-0.0.20 is released, revert the commit that introduced this
1881 ;; comment and update the package.
1882 (let ((commit "b4f27d9222568066cd59e4c387c51a35056c99d8")
1886 (version (git-version "0.0.19" revision commit))
1890 (url "https://github.com/Qucs/qucs")
1893 (base32 "10bclay9xhkffmsh4j4l28kj1qpxx0pnxja5vx6305cllnq4r3gb"))
1894 (file-name (string-append name "-" version "-checkout"))))
1895 (build-system gnu-build-system)
1898 (modify-phases %standard-phases
1899 (add-before 'bootstrap 'patch-bootstrap
1901 (for-each patch-shebang
1904 "qucs-doc/bootstrap"
1905 "qucs-core/bootstrap"))
1907 (add-before 'configure 'patch-configure
1908 (lambda* (#:key inputs #:allow-other-keys)
1909 (substitute* "qucs/configure"
1910 (("\\$QTDIR") (assoc-ref inputs "qt4")))
1912 (add-after 'patch-configure 'patch-scripts
1913 (lambda* (#:key inputs outputs #:allow-other-keys)
1914 (substitute* '("qucs/qucs/qucsdigi"
1915 "qucs/qucs/qucsdigilib"
1916 "qucs/qucs/qucsveri")
1918 (string-append (assoc-ref outputs "out") "/bin"))
1920 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
1922 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
1924 (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
1926 (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
1928 (string-append (assoc-ref inputs "sed") "/bin/sed"))
1930 (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
1932 (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
1934 (add-before 'check 'pre-check
1936 ;; The test suite requires a running X server.
1937 (system "Xvfb :1 &")
1938 (setenv "DISPLAY" ":1")
1940 (add-after 'install 'make-wrapper
1941 (lambda* (#:key inputs outputs #:allow-other-keys)
1942 (let ((out (assoc-ref outputs "out")))
1943 ;; 'qucs' directly invokes gcc, hence this wrapping.
1944 (wrap-program (string-append out "/bin/qucs")
1945 `("CPLUS_INCLUDE_PATH" ":" prefix
1946 (,(string-append (assoc-ref inputs "gcc-toolchain")
1949 (,(string-append (assoc-ref inputs "gcc-toolchain")
1951 `("LIBRARY_PATH" ":" prefix
1952 (,(string-append (assoc-ref inputs "gcc-toolchain")
1954 `("ADMSXMLBINDIR" ":" prefix
1955 (,(string-append (assoc-ref inputs "adms") "/bin")))
1956 `("ASCOBINDIR" ":" prefix
1957 (,(string-append (assoc-ref inputs "asco") "/bin")))
1958 `("QUCS_OCTAVE" ":" prefix
1959 (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
1961 #:parallel-build? #f ; race condition
1962 #:configure-flags '("--disable-doc"))) ; we need octave-epstk
1964 `(("autoconf" ,autoconf)
1965 ("automake" ,automake)
1969 ("libtool-native" ,libtool)
1970 ("pkg-config" ,pkg-config)
1971 ("python" ,python-2) ; for tests
1972 ("matplotlib" ,python2-matplotlib) ; for tests
1973 ("numpy" ,python2-numpy) ; for tests
1974 ("xorg-server" ,xorg-server-for-tests))) ; for tests
1978 ("coreutils" ,coreutils)
1979 ("freehdl" ,freehdl)
1980 ("gcc-toolchain" ,gcc-toolchain)
1981 ("iverilog" ,iverilog)
1982 ("libtool" ,libtool)
1983 ("octave" ,octave-cli)
1986 (home-page "http://qucs.sourceforge.net/")
1987 (synopsis "Circuit simulator with graphical user interface")
1989 "Qucs is a circuit simulator with graphical user interface. The software
1990 aims to support all kinds of circuit simulation types---e.g. DC, AC,
1991 S-parameter, transient, noise and harmonic balance analysis. Pure digital
1992 simulations are also supported.")
1993 (license license:gpl2+))))
1995 (define-public qucs-s
2001 (uri (string-append "https://github.com/ra3xdh/qucs_s/archive/"
2003 (file-name (string-append name "-" version ".tar.gz"))
2006 "12m1jwhb9qwvb141qzyskbxnw3wn1x22d02z4b4862p7xvccl5h7"))))
2007 (build-system cmake-build-system)
2009 `(#:tests? #f ; no tests
2011 (modify-phases %standard-phases
2012 (add-before 'configure 'patch-scripts
2013 (lambda* (#:key inputs #:allow-other-keys)
2014 (substitute* '("qucs/qucsdigi"
2018 (string-append (assoc-ref inputs "qucs") "/bin"))
2020 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
2022 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
2024 (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
2026 (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
2028 (string-append (assoc-ref inputs "sed") "/bin/sed"))
2030 (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
2032 (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
2034 (add-after 'patch-scripts 'patch-paths
2035 (lambda* (#:key inputs #:allow-other-keys)
2036 (substitute* "qucs/main.cpp"
2037 (((string-append "QucsSettings\\.Qucsator = QucsSettings\\.BinDir "
2038 "\\+ \"qucsator\" \\+ executableSuffix"))
2039 (string-append "}{ QucsSettings.Qucsator = \""
2040 (assoc-ref inputs "qucs") "/bin/qucsator\""))
2041 (((string-append "QucsSettings\\.XyceExecutable = "
2042 "\"/usr/local/Xyce-Release-6.8.0-OPENSOURCE/bin/Xyce"))
2043 (string-append "}{ QucsSettings.XyceExecutable = \""
2044 (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
2045 (((string-append "else QucsSettings\\.XyceParExecutable = "
2046 "\"mpirun -np %p /usr/local"
2047 "/Xyce-Release-6.8.0-OPENMPI-OPENSOURCE/bin/Xyce"))
2048 (string-append "QucsSettings.XyceParExecutable = \""
2049 (assoc-ref inputs "mpi") "/bin/mpirun -np %p "
2050 (assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
2051 (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
2052 (string-append "QucsSettings.NgspiceExecutable = " "\""
2053 (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
2054 (substitute* "qucs/extsimkernels/ngspice.cpp"
2055 (("share/qucs/xspice_cmlib") "share/qucs-s/xspice_cmlib"))
2056 (substitute* "qucs/qucs_actions.cpp"
2058 (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
2060 (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
2062 (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
2064 (add-after 'install 'install-scripts
2065 (lambda* (#:key inputs outputs #:allow-other-keys)
2068 (let ((file (string-append "../qucs_s-" ,version
2070 (out (assoc-ref outputs "out")))
2071 (install-file file (string-append out "/bin"))
2072 (chmod (string-append out "/bin/" script) #o555)))
2073 '("qucsdigi" "qucsdigilib" "qucsveri"))
2075 (add-after 'install-scripts 'make-wrapper
2076 (lambda* (#:key inputs outputs #:allow-other-keys)
2077 (let* ((out (assoc-ref outputs "out"))
2078 (file (string-append out "/bin/qucs-s"))
2079 (qucs (assoc-ref inputs "qucs"))
2080 (qucsator (string-append qucs "/bin/qucsator")))
2082 `("CPLUS_INCLUDE_PATH" ":" prefix
2083 (,(string-append (assoc-ref inputs "gcc-toolchain")
2086 (,(string-append (assoc-ref inputs "gcc-toolchain")
2088 `("LIBRARY_PATH" ":" prefix
2089 (,(string-append (assoc-ref inputs "gcc-toolchain")
2091 `("QUCSATOR" ":" prefix (,qucsator))
2092 `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
2093 `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms")
2095 `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco")
2097 `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave")
2099 (symlink qucsator (string-append out "/bin/qucsator"))
2102 `(("libtool-native" ,libtool)))
2106 ("coreutils" ,coreutils)
2107 ("freehdl" ,freehdl)
2108 ("gcc-toolchain" ,gcc-toolchain)
2109 ("iverilog" ,iverilog)
2110 ("libtool" ,libtool)
2112 ("ngspice" ,ngspice)
2113 ("octave" ,octave-cli)
2117 ("xyce-serial" ,xyce-serial)
2118 ("xyce-parallel" ,xyce-parallel)))
2119 (home-page "https://ra3xdh.github.io/")
2120 (synopsis "Circuit simulator with graphical user interface")
2122 "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
2123 The S letter indicates SPICE. The purpose of the Qucs-S subproject is to use
2124 free SPICE circuit simulation kernels with the Qucs GUI. It provides the
2125 simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
2126 (license license:gpl2+)))
2128 (define-public librepcb
2135 (uri (string-append "https://download.librepcb.org/releases/"
2136 version "/librepcb-" version "-source.zip"))
2138 (base32 "1b5dkanz3q0y5ag80w0l85hn7axrachb5m9zvyv4zvzrfy09wa88"))))
2139 (build-system gnu-build-system)
2141 `(("qtbase" ,qtbase)
2145 `(("qttools" ,qttools) ; for lrelease
2149 (modify-phases %standard-phases
2151 (lambda* (#:key inputs outputs #:allow-other-keys)
2154 (let ((lrelease (string-append (assoc-ref inputs "qttools")
2156 (out (assoc-ref outputs "out")))
2158 (string-append "QMAKE_LRELEASE=" lrelease)
2159 (string-append "PREFIX=" out)
2160 "../librepcb.pro")))))))
2161 (home-page "https://librepcb.org/")
2162 (synopsis "Electronic Design Automation tool")
2163 (description "LibrePCB is @dfn{Electronic Design Automation} (EDA)
2164 software to develop printed circuit boards. It features human readable file
2165 formats and complete project management with library, schematic and board
2167 (license (list license:gpl3+
2168 license:boost1.0 ; libs/clipper,
2169 ; libs/optional/tests/catch.hpp,
2170 ; libs/sexpresso/tests/catch.hpp
2171 license:expat ; libs/delaunay-triangulation,
2172 ; libs/parseagle, libs/type_safe
2173 license:asl2.0 ; libs/fontobene, libs/googletest,
2175 license:isc ; libs/hoedown
2176 license:cc0 ; libs/optional, libs/sexpresso
2177 license:bsd-2 ; libs/optional/tests/catch.hpp
2178 license:lgpl2.1+)))) ; libs/quazip
2187 (url "https://github.com/markwal/GPX")
2189 (file-name (git-file-name name version))
2192 "1yab269x8qyf7rd04vaxyqyjv4pzz9lp4sc4dwh927k23avr3rw5"))))
2193 (build-system gnu-build-system)
2194 (home-page "https://github.com/markwal/GPX")
2195 (synopsis "Converting gcode to x3g files for 3D printing")
2197 "GPX is a post processing utility for converting gcode output from 3D
2198 slicing software to x3g files for standalone 3D printing on common 3D
2200 (license license:gpl2+)))
2202 (define-public gnucap
2205 (version "20171003")
2209 (uri (string-append "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-"
2213 "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g"))))
2214 (build-system gnu-build-system)
2216 `(("readline" ,readline)))
2219 (modify-phases %standard-phases
2221 (lambda* (#:key outputs #:allow-other-keys)
2222 (let ((out (assoc-ref outputs "out")))
2223 ;; Set correct rpath so that gnucap finds libgnucap.so.
2224 (substitute* (list "apps/configure" "lib/configure"
2225 "main/configure" "modelgen/configure")
2227 (string-append "LDFLAGS = -Wl,-rpath=" out "/lib")))
2228 ;; gnucap uses a hand-written configure script that expects the
2229 ;; --prefix argument to be the first argument passed to it.
2230 (invoke "./configure" (string-append "--prefix=" out)))))
2232 (lambda* (#:key outputs #:allow-other-keys)
2233 (let ((out (assoc-ref outputs "out"))
2234 (libpath "../lib/O:../apps/O"))
2235 (with-directory-excursion "tests"
2236 ;; Make test return non-zero exit code when a test fails.
2238 (("/bin/sh") "/bin/sh -e")
2239 (("\\|\\| echo \"\\*\\*\\*\\* \\$ii fails \\*\\*\\*\\*\"") ""))
2240 ;; Fix expected plugin search path for test c_attach.1.gc
2241 (substitute* "==out/c_attach.1.gc.out"
2242 (("/usr/local/lib/gnucap")
2243 (string-append libpath ":" out "/lib/gnucap")))
2244 ;; Set library path so that gnucap can find libgnucap.so
2245 ;; while running the tests.
2246 (setenv "LD_LIBRARY_PATH" libpath)
2247 (invoke "./test" "../main/O/gnucap" "" "test-output" "==out"))))))))
2248 (home-page "https://www.gnu.org/software/gnucap/")
2249 (synopsis "Mixed analog and digital circuit simulator")
2250 (description "GNUcap is a circuit analysis package. It offers a general
2251 purpose circuit simulator and can perform DC and transient analyses, fourier
2252 analysis and AC analysis. The engine is designed to do true mixed-mode
2254 (license license:gpl3+)))
2256 (define-public cutter
2264 (url "https://github.com/radareorg/cutter")
2265 (commit (string-append "v" version))))
2266 (file-name (git-file-name name version))
2268 (base32 "0qj8jyij02nif4jpirl09ygwnv8a9zi3vkb5sf5s8mg7qwlpnvyk"))))
2269 (build-system gnu-build-system)
2272 (modify-phases %standard-phases
2274 (lambda* (#:key inputs outputs #:allow-other-keys)
2275 (let ((out (assoc-ref outputs "out"))
2276 (radare2 (assoc-ref inputs "radare2")))
2277 ;; Fix pkg-config detection ./src/lib_radare2.pri:PREFIX=/usr/lib
2278 ;; override `qmake PREFIX=`.
2279 (substitute* "./src/lib_radare2.pri"
2280 (("PREFIX") "R2PREFIX")
2281 (("R2PREFIX=/usr") (string-append "R2PREFIX=" radare2)))
2283 (string-append "PREFIX=" out)
2284 "./src/Cutter.pro")))))))
2286 `(("pkg-config" ,pkg-config)))
2288 `(("qtbase" ,qtbase)
2290 ("openssl" ,openssl)
2291 ("radare2" ,radare2)))
2292 (home-page "https://github.com/radareorg/cutter")
2293 (synopsis "GUI for radare2 reverse engineering framework")
2294 (description "Cutter is a GUI for radare2 reverse engineering framework.
2295 Its goal is making an advanced andcustomizable reverse-engineering platform
2296 while keeping the user experience at mind. Cutter is created by reverse
2297 engineers for reverse engineers.")
2298 (license (list license:cc-by-sa3.0 ;the "Iconic" icon set
2299 license:gpl3+)))) ;everything else
2301 (define-public lib3mf
2308 (uri (git-reference (url "https://github.com/3MFConsortium/lib3mf")
2309 (commit (string-append "v" version))))
2310 (file-name (git-file-name name version))
2313 "11wpk6n9ga2p57h1dcrp37w77mii0r7r6mlrgmykf7rvii1rzgqd"))))
2314 (build-system cmake-build-system)
2316 `(("googletest-source" ,(package-source googletest))))
2318 `(("libuuid" ,util-linux "lib")))
2321 (modify-phases %standard-phases
2322 (add-after 'unpack 'unpack-googletest
2323 (lambda* (#:key inputs #:allow-other-keys)
2324 (copy-recursively (assoc-ref inputs "googletest-source")
2325 "UnitTests/googletest")
2327 (synopsis "Implementation of the 3D Manufacturing Format (3MF) file standard")
2329 "Lib3MF is a C++ implementation of the 3D Manufacturing Format (3MF) file
2330 standard. It offers a way to integrate 3MF reading and writing capabilities, as
2331 well as conversion and validation tools for input and output data. The
2332 specification can be downloaded at @url{http://3mf.io/specification/}.")
2333 (home-page "https://3mf.io/")
2334 (license license:bsd-2)))
2336 (define-public openscad
2343 (uri (string-append "https://files.openscad.org/openscad-" version
2347 "0nbgk5q5pgnw53la0kccdcpz2f4xf6d6076rkn0q08z57hkc85ha"))
2348 (patches (search-patches
2349 "openscad-parser-boost-1.72.patch"))))
2350 (build-system cmake-build-system)
2354 ("double-conversion" ,double-conversion)
2356 ("fontconfig" ,fontconfig)
2359 ("harfbuzz" ,harfbuzz)
2361 ("libxml2" ,libxml2)
2364 ("opencsg" ,opencsg)
2365 ("qscintilla" ,qscintilla)
2367 ("qtmultimedia" ,qtmultimedia)))
2371 ("gettext" ,gettext-minimal)
2372 ("pkg-config" ,pkg-config)
2374 ;; the following are only needed for tests
2375 ("imagemagick" ,imagemagick)
2378 ("xvfb" ,xorg-server-for-tests)))
2381 (modify-phases %standard-phases
2383 (lambda* (#:key outputs #:allow-other-keys)
2385 (string-append "PREFIX=" (assoc-ref outputs "out")))
2389 (with-directory-excursion "tests"
2390 (invoke "cmake" ".")
2393 ;; strip python test files since lib dir ends up in out/share
2394 (for-each delete-file
2395 (find-files "libraries/MCAD" ".*\\.py"))
2397 (synopsis "Script-based 3D modeling application")
2399 "OpenSCAD is a 3D Computer-aided Design (CAD) application. Unlike an
2400 interactive modeler, OpenSCAD generates 3D models from a script, giving you
2401 full programmatic control over your models.")
2402 (home-page "https://www.openscad.org/")
2403 (license license:gpl2+)))
2405 (define-public freecad
2413 (url "https://github.com/FreeCAD/FreeCAD")
2415 (modules '((guix build utils)))
2418 ;; Fix build with Python 3.8, see
2419 ;; <https://tracker.freecadweb.org/view.php?id=4143>.
2420 (substitute* "src/Base/swigpyrun.inl"
2421 (("PyObject \\*modules = interp->modules;")
2422 "PyObject *modules = PyEval_GetBuiltins();"))
2424 (file-name (git-file-name name version))
2427 "170hk1kgrvsddrwykp24wyj0cha78zzmzbf50gn98x7ngqqs395s"))))
2428 (build-system qt-build-system)
2430 `(("doxygen" ,doxygen)
2431 ("graphviz" ,graphviz)
2432 ("qttools" ,qttools)
2433 ("pkg-config" ,pkg-config)
2439 ("freetype" ,freetype)
2442 ("libarea" ,libarea)
2443 ("libmedfile" ,libmedfile)
2444 ("libspnav" ,libspnav)
2447 ("openmpi" ,openmpi)
2448 ("opencascade-occt" ,opencascade-occt)
2449 ("python-matplotlib" ,python-matplotlib)
2450 ("python-pyside-2" ,python-pyside-2)
2451 ("python-pyside-2-tools" ,python-pyside-2-tools)
2452 ("python-shiboken-2" ,python-shiboken-2)
2453 ("python-wrapper" ,python-wrapper)
2456 ("qtx11extras" ,qtx11extras)
2457 ("qtxmlpatterns" ,qtxmlpatterns)
2458 ;; qtwebkit is optional. We remove it currently, because it takes
2459 ;; much time to compile and substitutes are often unavailable
2460 ;;("qtwebkit" ,qtwebkit)
2463 ("xerces-c" ,xerces-c)
2470 (string-append "-DCMAKE_INSTALL_LIBDIR="
2471 (assoc-ref %outputs "out") "/lib"))
2473 (modify-phases %standard-phases
2474 (add-before 'configure 'restore-pythonpath
2476 (substitute* "src/Main/MainGui.cpp"
2477 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
2479 (add-after 'install 'wrap-pythonpath
2480 (lambda* (#:key outputs #:allow-other-keys)
2481 (let ((out (assoc-ref outputs "out")))
2482 (wrap-program (string-append out "/bin/FreeCAD")
2484 'prefix (list (getenv "PYTHONPATH")))))
2486 (home-page "https://www.freecadweb.org/")
2487 (synopsis "Your Own 3D Parametric Modeler")
2489 "FreeCAD is a general purpose feature-based, parametric 3D modeler for
2490 CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
2491 product design but also fits a wider range of uses in engineering, such as
2492 architecture or other engineering specialties. It is 100% Open Source (LGPL2+
2493 license) and extremely modular, allowing for very advanced extension and
2502 (define-public libmedfile
2510 "https://files.salome-platform.org/Salome/other/med-"
2514 "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
2515 (build-system cmake-build-system)
2516 (inputs `(("hdf5" ,hdf5-1.10)))
2519 (modify-phases %standard-phases
2520 (add-after 'install 'remove-test-output
2521 (lambda* (#:key outputs #:allow-other-keys)
2522 (let ((out (assoc-ref outputs "out")))
2523 (delete-file-recursively
2524 (string-append out "/bin/testc"))
2526 (home-page "https://www.salome-platform.org")
2527 (synopsis "Library to read and write MED files")
2529 "The purpose of the MED module is to provide a standard for storing and
2530 recovering computer data associated to numerical meshes and fields, and to
2531 facilitate the exchange between codes and solvers.
2533 The persistent data storage is based upon HDF format (like CGNS, a standard
2534 developed by Boeing and NASA in the area of Computational Fluid Dynamic).
2536 MED also provides structures to hold data on meshes and fields. These
2537 structures are exchanged between solvers, hide the communication level (CORBA
2538 or MPI), and offer persistence (read/write in .med files).
2540 The main benefit of a common exchange format is reduced complexity of code
2541 coupling. It also allows sharing such high level functionalities as
2542 computation of nodal connectivity of sub-elements (faces and edges),
2543 arithmetic operations on fields, entity location functionalities, and
2544 interpolation toolkit.")
2545 (license license:gpl3+)))
2547 (define-public libarea
2548 (let ((revision "1")
2549 (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
2552 (version (git-version "0" revision commit))
2556 (uri (git-reference (url "https://github.com/Heeks/libarea")
2558 (file-name (git-file-name name version))
2560 (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
2561 (build-system gnu-build-system)
2562 (inputs `(("boost" ,boost)
2563 ("python-wrapper" ,python-wrapper)))
2565 `(("cmake" ,cmake-minimal)))
2569 (modify-phases %standard-phases
2570 (add-after 'configure 'cmake-configure
2571 (lambda* (#:key inputs outputs #:allow-other-keys)
2572 (let ((out (assoc-ref outputs "out"))
2573 (cmake (assoc-ref inputs "cmake")))
2576 (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
2577 (delete 'configure))))
2578 (home-page "https://github.com/Heeks/libarea")
2580 "Library and python module for pocketing and profiling operations")
2582 "Area is a CAM-related software for pocketing operation.
2584 This project provides library and associated python-module to compute pocket
2590 (define-public libspnav
2597 (url "https://github.com/FreeSpacenav/libspnav")
2598 (commit (string-append "libspnav-" version))))
2601 "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba"))
2602 (file-name (git-file-name name version))))
2603 (build-system gnu-build-system)
2605 `(("libx11" ,libx11)))
2606 (arguments `(#:tests? #f))
2607 (home-page "http://spacenav.sourceforge.net/")
2609 "Library for communicating with spacenavd or 3dxsrv")
2611 "The libspnav library is provided as a replacement of the magellan
2612 library. It provides a cleaner, and more orthogonal interface. libspnav
2613 supports both the original X11 protocol for communicating with the driver, and
2614 the new alternative non-X protocol. Programs that choose to use the X11
2615 protocol, are automatically compatible with either the free spacenavd driver
2616 or the official 3dxserv, as if they were using the magellan SDK.
2618 Also, libspnav provides a magellan API wrapper on top of the new API. So, any
2619 applications that were using the magellan library, can switch to libspnav
2620 without any changes. And programmers that are familiar with the magellan API
2621 can continue using it with a free library without the restrictions of the
2623 (license license:bsd-3)))
2625 (define-public openctm
2626 (let ((revision 603))
2627 ;; Previous versions don't compile, they need to link libGL and libGLU.
2628 ;; Fixed in this revision.
2631 (version (string-append "1.0.3." (number->string revision)))
2636 (url "https://svn.code.sf.net/p/openctm/code/trunk")
2637 (revision revision)))
2638 (file-name (string-append name "-" version "-checkout"))
2640 (base32 "01wb70m48xh5gwhv60a5brv4sxl0i0rh038w32cgnlxn5x86s9f1"))))
2641 (build-system gnu-build-system)
2643 `(("pkg-config" ,pkg-config)))
2650 `(#:tests? #f ;no tests
2652 (modify-phases %standard-phases
2654 (lambda* (#:key outputs #:allow-other-keys)
2655 (rename-file "Makefile.linux" "Makefile")
2656 (let ((out (assoc-ref outputs "out")))
2657 ;; Create output directories.
2658 (mkdir-p (string-append out "/lib"))
2659 (mkdir-p (string-append out "/include"))
2660 (mkdir-p (string-append out "/bin"))
2662 (substitute* "tools/Makefile.linux"
2664 (string-append "-rpath," out "/lib/"))
2667 ;; Set right output.
2668 (substitute* "Makefile"
2670 (string-append out "/lib"))
2674 (synopsis "3D triangle mesh format and related tools and libraries")
2675 (description "OpenCTM is a file format, a software library and a tool set
2676 for compression of 3D triangle meshes. The geometry is compressed to a
2677 fraction of comparable file formats (3DS, STL, COLLADA...), and the format is
2678 accessible through a simple API")
2679 (license license:zlib)
2680 (home-page "http://openctm.sourceforge.net/"))))
2682 (define-public lib3ds
2690 "https://storage.googleapis.com/google-code-archive-downloads"
2691 "/v2/code.google.com/lib3ds/lib3ds-" version ".zip"))
2693 (base32 "1qr9arfdkjf7q11xhvxwzmhxqz3nhcjkyb8zzfjpz9jm54q0rc7m"))))
2694 (build-system gnu-build-system)
2696 `(("unzip" ,unzip)))
2697 (home-page "https://code.google.com/archive/p/lib3ds")
2698 (synopsis "3DS format file toolkit")
2699 (description "Lib3ds is a toolkit for handling the 3DS format for 3D
2700 model files. Its main goal is to simplify the creation of 3DS import and
2702 (license license:lgpl2.1+)))
2704 (define-public meshlab
2711 (url "https://github.com/cnr-isti-vclab/meshlab")
2712 (commit (string-append "Meshlab-" version))
2714 (file-name (git-file-name name version))
2716 (base32 "1cgx24wxh2ah5pff51rcrk6x8qcdjpkxcdak7s4cfzmxvjlshydd"))))
2717 (build-system cmake-build-system)
2719 `(("qtbase" ,qtbase)
2720 ("qtscript" ,qtscript)
2721 ("qtxmlpatterns" ,qtxmlpatterns)
2725 ("muparser" ,muparser)
2728 ("libfreenect" ,libfreenect)
2730 ("openctm" ,openctm)
2731 ;; FIXME: Compilation fails with system qhull:
2732 ;; https://github.com/cnr-isti-vclab/meshlab/issues/678
2736 `(#:tests? #f ; Has no tests
2738 (modify-phases %standard-phases
2739 (add-after 'unpack 'go-to-source-dir
2740 (lambda _ (chdir "src") #t))
2741 (add-after 'install 'move-files
2742 (lambda* (#:key outputs #:allow-other-keys)
2743 (let ((lib (string-append (assoc-ref outputs "out")
2746 (string-append lib "/meshlab/libmeshlab-common.so")
2747 (string-append lib "/libmeshlab-common.so"))
2749 (synopsis "3D triangular mesh processing and editing software")
2750 (home-page "https://www.meshlab.net/")
2751 (description "MeshLab is a system for the processing and
2752 editing of unstructured large 3D triangular meshes. It is aimed to help the
2753 processing of the typical not-so-small unstructured models arising in 3D
2754 scanning, providing a set of tools for editing, cleaning, healing, inspecting,
2755 rendering and converting this kind of meshes. These tools include MeshLab
2756 proper, a versatile program with a graphical user interface, and meshlabserver,
2757 a program that can perform mesh processing tasks in batch mode, without a
2759 (license license:gpl3+)))
2762 ;; Upstream has yet to tag any releases.
2763 (let ((commit "d33317a46e3b7c48130a471a48cbfea1abab70d8")
2767 (version (git-version "0.0.0" revision commit))
2772 (url "git://git.savannah.gnu.org/poke.git")
2776 (base32 "1dd0r1x123bqi78lrsk58rvg9c9wka0kywdyzn7g3i4hkh54xb7d"))
2777 (file-name (git-file-name name version))))
2778 (build-system gnu-build-system)
2779 ;; The GUI, which we elide, requires tcl and tk.
2780 (native-inputs `(("autoconf" ,autoconf)
2781 ("automake" ,automake)
2782 ;; Requires bison 3.6+ but we currently only have 3.5.
2783 ;; Bison 3.6 will be available in the next core update.
2784 ("bison-3.6" ,bison-3.6)
2786 ("dejagnu" ,dejagnu)
2788 ("gettext" ,gettext-minimal)
2789 ("help2man" ,help2man)
2790 ("libtool" ,libtool)
2792 ("pkg-config" ,pkg-config)
2793 ("python-2" ,python-2)
2794 ("python-3" ,python-3)
2795 ("texinfo" ,texinfo)))
2796 ;; FIXME: Enable NBD support by adding `libnbd' (currently unpackaged).
2797 ;; FIXME: A "hyperlinks-capable" `libtexststyle' needed for the hserver.
2798 (inputs `(("json-c" ,json-c)
2800 ("readline" ,readline)))
2802 ;; To build the GUI, add the `--enable-gui' configure flag.
2803 ;; To enable the "hyperlink server", add the `--enable-hserver' flag.
2804 `(#:configure-flags '("--enable-mi")
2805 #:phases (modify-phases %standard-phases
2806 ;; This is a non-trivial bootstrap that needs many of the
2807 ;; native-inputs and thus must run after `patch-shebangs'.
2809 (add-after 'patch-source-shebangs 'bootstrap
2811 (invoke "./bootstrap" "--no-git"
2812 "--no-bootstrap-sync"
2813 "--gnulib-srcdir=gnulib")
2815 (home-page "http://jemarch.net/poke.html")
2816 (synopsis "Interactive, extensible editor for binary data")
2817 (description "GNU poke is an interactive, extensible editor for binary
2818 data. Not limited to editing basic entities such as bits and bytes, it
2819 provides a full-fledged procedural, interactive programming language designed
2820 to describe data structures and to operate on them.")
2821 (license license:gpl3+))))