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>
23 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
25 ;;; This file is part of GNU Guix.
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40 (define-module (gnu packages engineering)
41 #:use-module (guix packages)
42 #:use-module (guix download)
43 #:use-module (guix gexp)
44 #:use-module (guix git-download)
45 #:use-module (guix svn-download)
46 #:use-module (guix monads)
47 #:use-module (guix store)
48 #:use-module (guix utils)
49 #:use-module ((srfi srfi-1) #:hide (zip))
50 #:use-module ((guix licenses) #:prefix license:)
51 #:use-module (guix build-system ant)
52 #:use-module (guix build-system cmake)
53 #:use-module (guix build-system gnu)
54 #:use-module (guix build-system python)
55 #:use-module (guix build-system qt)
56 #:use-module (gnu packages)
57 #:use-module (gnu packages algebra)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bdw-gc)
61 #:use-module (gnu packages bison)
62 #:use-module (gnu packages boost)
63 #:use-module (gnu packages check)
64 #:use-module (gnu packages cmake)
65 #:use-module (gnu packages commencement)
66 #:use-module (gnu packages compression)
67 #:use-module (gnu packages curl)
68 #:use-module (gnu packages dejagnu)
69 #:use-module (gnu packages digest)
70 #:use-module (gnu packages documentation)
71 #:use-module (gnu packages flex)
72 #:use-module (gnu packages fontutils)
73 #:use-module (gnu packages fpga)
74 #:use-module (gnu packages freedesktop)
75 #:use-module (gnu packages gcc)
76 #:use-module (gnu packages gd)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages ghostscript)
79 #:use-module (gnu packages gl)
80 #:use-module (gnu packages glib)
81 #:use-module (gnu packages gnome)
82 #:use-module (gnu packages gperf)
83 #:use-module (gnu packages graphics)
84 #:use-module (gnu packages graphviz)
85 #:use-module (gnu packages groff)
86 #:use-module (gnu packages gtk)
87 #:use-module (gnu packages guile)
88 #:use-module (gnu packages image)
89 #:use-module (gnu packages image-processing)
90 #:use-module (gnu packages imagemagick)
91 #:use-module (gnu packages libevent)
92 #:use-module (gnu packages linux) ;FIXME: for pcb
93 #:use-module (gnu packages lisp)
94 #:use-module (gnu packages m4)
95 #:use-module (gnu packages maths)
96 #:use-module (gnu packages man)
97 #:use-module (gnu packages multiprecision)
98 #:use-module (gnu packages mpi)
99 #:use-module (gnu packages ncurses)
100 #:use-module (gnu packages parallel)
101 #:use-module (gnu packages pcre)
102 #:use-module (gnu packages perl)
103 #:use-module (gnu packages pkg-config)
104 #:use-module (gnu packages python)
105 #:use-module (gnu packages python-xyz)
106 #:use-module (gnu packages qt)
107 #:use-module (gnu packages readline)
108 #:use-module (gnu packages swig)
109 #:use-module (gnu packages tbb)
110 #:use-module (gnu packages tcl)
111 #:use-module (gnu packages texinfo)
112 #:use-module (gnu packages tls)
113 #:use-module (gnu packages tex)
114 #:use-module (gnu packages version-control)
115 #:use-module (gnu packages web)
116 #:use-module (gnu packages wxwidgets)
117 #:use-module (gnu packages xml)
118 #:use-module (gnu packages openkinect)
119 #:use-module (gnu packages xorg))
121 (define-public librecad
128 "https://github.com/LibreCAD/LibreCAD/archive/"
130 (file-name (string-append name "-" version ".tar.gz"))
133 "01nvc1g3si05r5np1pzn62ah9w84p8nxa32wqrjh6gdi17jfvi3l"))))
134 (build-system gnu-build-system)
137 (modify-phases %standard-phases
138 ;; Without this patch boost complains that "make_array" is not a
139 ;; member of "boost::serialization".
140 (add-after 'unpack 'patch-boost-error
142 (substitute* "librecad/src/lib/math/lc_quadratic.h"
143 (("#include \"rs_vector.h\"" line)
145 "\n#include <boost/serialization/array_wrapper.hpp>")))
146 (substitute* "librecad/src/lib/math/rs_math.cpp"
147 (("#include <boost/numeric/ublas/matrix.hpp>" line)
148 (string-append "#include <boost/serialization/array_wrapper.hpp>\n"
151 ;; Fix build against Qt 5.11.
152 (add-after 'unpack 'add-missing-headers
154 (substitute* "librecad/src/ui/generic/widgetcreator.cpp"
155 (("#include <QPushButton>") "#include <QPushButton>
156 #include <QActionGroup>"))
158 (add-after 'unpack 'patch-paths
159 (lambda* (#:key outputs #:allow-other-keys)
160 (let ((out (assoc-ref outputs "out")))
161 (substitute* "librecad/src/lib/engine/rs_system.cpp"
162 (("/usr/share") (string-append out "/share"))))))
164 (lambda* (#:key inputs #:allow-other-keys)
165 (system* "qmake" (string-append "BOOST_DIR="
166 (assoc-ref inputs "boost")))))
168 (lambda* (#:key outputs #:allow-other-keys)
169 (let* ((out (assoc-ref outputs "out"))
170 (bin (string-append out "/bin"))
171 (share (string-append out "/share/librecad")))
173 (install-file "unix/librecad" bin)
175 (copy-recursively "unix/resources" share))
177 ;; Ensure that icons are found at runtime
178 (add-after 'install 'wrap-executable
179 (lambda* (#:key inputs outputs #:allow-other-keys)
180 (let* ((out (assoc-ref outputs "out"))
181 (qt '("qtbase" "qtsvg")))
182 (wrap-program (string-append out "/bin/librecad")
183 `("QT_PLUGIN_PATH" ":" prefix
184 ,(map (lambda (label)
185 (string-append (assoc-ref inputs label)
186 "/lib/qt5/plugins/"))
191 ("muparser" ,muparser)
192 ("freetype" ,freetype)
196 `(("pkg-config" ,pkg-config)
198 (home-page "https://librecad.org/")
199 (synopsis "Computer-aided design (CAD) application")
201 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
203 (license license:gpl2)))
205 (define-public geda-gaf
212 "http://ftp.geda-project.org/geda-gaf/stable/v"
213 (version-major+minor version) "/"
214 version "/geda-gaf-" version ".tar.gz"))
217 "06ivgarvwbzjz2wigxzzkm8iszldi2p6x3a6jnlczjyrz4csddsy"))))
218 (build-system gnu-build-system)
221 (modify-phases %standard-phases
222 ;; tests require a writable HOME
223 (add-before 'check 'set-home
225 (setenv "HOME" (getenv "TMPDIR"))
227 (add-after 'unpack 'disable-failing-tests
229 (substitute* "xorn/tests/Makefile.in"
231 ;; This test returns its correct result in an unexpected order.
232 (substitute* "libgeda/scheme/unit-tests/t0402-config.scm"
233 (("\\(begin-config-test 'config-keys" m)
234 (string-append "#;" m)))
237 (let ((pcb (assoc-ref %build-inputs "pcb")))
238 (list (string-append "--with-pcb-datadir=" pcb "/share")
239 (string-append "--with-pcb-lib-path="
240 pcb "/share/pcb/pcblib-newlib:"
241 pcb "/share/pcb/newlib")))))
247 ("shared-mime-info" ,shared-mime-info)
250 ("python" ,python-2))) ; for xorn
252 `(("pkg-config" ,pkg-config)
253 ("desktop-file-utils" ,desktop-file-utils)
254 ("perl" ,perl))) ; for tests
255 (home-page "http://geda-project.org/")
256 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
258 "Gaf stands for “gschem and friends”. It is a subset of the entire tool
259 suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
260 which currently includes: gschem, a schematic capture program; gnetlist, a
261 netlist generation program; gsymcheck, a syntax checker for schematic symbols;
262 gattrib, a spreadsheet programm that manipulates the properties of symbols of
263 a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
264 tool to forward annotation from your schematic to layout using PCB; some minor
266 (license license:gpl2+)))
268 (define-public lepton-eda
269 ;; This is a fork of gEDA/gaf started in late 2016. One of its goal is to
270 ;; keep and to extend Guile support.
274 (version "1.9.11-20200604")
275 (home-page "https://github.com/lepton-eda/lepton-eda")
278 (uri (git-reference (url home-page) (commit version)))
281 "091y8h7wcr9smwhb1wf12sj27n5jrannbj3y6qq3q2gwiifiz8sd"))
282 (file-name (git-file-name name version))))
284 `(("autoconf" ,autoconf)
285 ("automake" ,automake)
286 ("desktop-file-utils" ,desktop-file-utils)
288 ("gettext" ,gettext-minimal)
292 ,@(package-native-inputs geda-gaf)))
297 ("shared-mime-info" ,shared-mime-info)
301 (substitute-keyword-arguments (package-arguments geda-gaf)
302 ((#:configure-flags flags ''())
303 ;; When running "make", the POT files are built with the build time as
304 ;; their "POT-Creation-Date". Later on, "make" notices that .pot
305 ;; files were updated and goes on to run "msgmerge"; as a result, the
306 ;; non-deterministic POT-Creation-Date finds its way into .po files,
307 ;; and then in .gmo files. To avoid that, simply make sure 'msgmerge'
308 ;; never runs. See <https://bugs.debian.org/792687>.
309 `(cons "ac_cv_path_MSGMERGE=true" ,flags))
310 ((#:phases phases '%standard-phases)
311 `(modify-phases %standard-phases
312 (add-before 'bootstrap 'prepare
314 ;; Some of the scripts there are invoked by autogen.sh.
315 (for-each patch-shebang (find-files "build-tools"))
317 ;; Make sure 'msgmerge' can modify the PO files.
318 (for-each (lambda (po)
320 (find-files "." "\\.po$"))
322 ;; This would normally be created by invoking 'git', but it
323 ;; doesn't work here.
324 (call-with-output-file "version.h"
326 (format port "#define PACKAGE_DATE_VERSION \"~a\"~%"
327 ,(string-drop version
328 (+ 1 (string-index version #\-))))
329 (format port "#define PACKAGE_DOTTED_VERSION \"~a\"~%"
330 ,(string-take version
331 (string-index version #\-)))
332 (format port "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%")))
334 (add-after 'install 'compile-scheme-files
335 (lambda* (#:key outputs #:allow-other-keys)
336 (invoke "make" "precompile")
337 (for-each (lambda (program)
338 (wrap-program program
339 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
340 (,(string-append (assoc-ref outputs "out")
341 "/share/lepton-eda/ccache/")))))
342 (find-files (string-append (assoc-ref outputs "out") "/bin")
346 "Lepton EDA ia an @dfn{electronic design automation} (EDA) tool set
347 forked from gEDA/gaf in late 2016. EDA tools are used for electrical circuit
348 design, schematic capture, simulation, prototyping, and production. Lepton
349 EDA includes tools for schematic capture, attribute management, bill of
350 materials (BOM) generation, netlisting into over 20 netlist formats, analog
351 and digital simulation, and printed circuit board (PCB) layout, and many other
360 (uri (string-append "mirror://sourceforge/pcb/pcb/pcb-" version
361 "/pcb-" version ".tar.gz"))
364 "1a7rilp75faidny0r4fdwdxkflyrqp6svxv9lbg7h868293962iz"))))
365 (build-system gnu-build-system)
368 (modify-phases %standard-phases
369 (add-after 'unpack 'use-wish8.6
371 (substitute* "configure"
372 (("wish85") "wish8.6"))
374 ;; It checks for "xhost", which we don't have. This shouldn't
375 ;; matter, because the test is supposed to be skipped, but it causes
376 ;; "run_tests.sh" (and thus the "check" phase) to fail.
377 (add-after 'unpack 'fix-check-for-display
379 (substitute* "tests/run_tests.sh"
380 (("have_display=no") "have_display=yes"))
382 (add-after 'install 'wrap
383 (lambda* (#:key inputs outputs #:allow-other-keys)
384 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
385 ;; fix of the mesa package we wrap the pcb executable such that
386 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
387 (let* ((out (assoc-ref outputs "out"))
388 (path (string-append (assoc-ref inputs "udev") "/lib")))
389 (wrap-program (string-append out "/bin/pcb")
390 `("LD_LIBRARY_PATH" ":" prefix (,path))))
392 (add-before 'check 'pre-check
395 (setenv "DISPLAY" ":1")
400 ("udev" ,eudev) ;FIXME: required by mesa
404 ("gtkglext" ,gtkglext)
405 ("shared-mime-info" ,shared-mime-info)
408 `(("pkg-config" ,pkg-config)
409 ("intltool" ,intltool)
411 ("desktop-file-utils" ,desktop-file-utils)
414 ("imagemagick" ,imagemagick)
416 ("ghostscript" ,ghostscript)
417 ("xvfb" ,xorg-server-for-tests)))
418 (home-page "http://pcb.geda-project.org/")
419 (synopsis "Design printed circuit board layouts")
421 "GNU PCB is an interactive tool for editing printed circuit board
422 layouts. It features a rats-nest implementation, schematic/netlist import,
423 and design rule checking. It also includes an autorouter and a trace
424 optimizer; and it can produce photorealistic and design review images.")
425 (license license:gpl2+)))
427 (define-public pcb-rnd
428 (package (inherit pcb)
433 (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/"
434 "pcb-rnd-" version ".tar.gz"))
437 "0j650498d87b4xsggzc0xlk73k0hhj43wfy45qz2lcn0xc3bks1m"))))
439 `(#:tests? #f ; no check target
441 (modify-phases %standard-phases
442 (add-after 'unpack 'cc-is-gcc
443 (lambda _ (setenv "CC" "gcc") #t))
445 ;; The configure script doesn't tolerate most of our configure flags.
446 (lambda* (#:key outputs #:allow-other-keys)
447 (invoke "sh" "configure"
448 (string-append "--prefix="
449 (assoc-ref outputs "out"))))))))
450 (home-page "http://repo.hu/projects/pcb-rnd/")
451 (description "PCB RND is a fork of the GNU PCB circuit board editing tool
452 featuring various improvements and bug fixes.")))
454 (define-public fastcap
457 (version "2.0-18Sep92")
459 (method url-fetch/tarbomb)
460 (uri (string-append "http://www.rle.mit.edu/cpg/codes/"
461 name "-" version ".tgz"))
464 "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k"))
466 ;; Remove a non-free file.
468 (delete-file "doc/psfig.sty")
470 (patches (search-patches "fastcap-mulSetup.patch"
471 "fastcap-mulGlobal.patch"))))
472 (build-system gnu-build-system)
474 ;; FIXME: with texlive-tiny citation references are rendered as question
475 ;; marks. During the build warnings like these are printed:
476 ;; LaTeX Warning: Citation `nabors91' on page 2 undefined on input line 3.
477 `(("texlive" ,(texlive-union (list texlive-fonts-amsfonts)))
478 ("ghostscript" ,ghostscript)))
480 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
482 #:tests? #f ;; no tests-suite
483 #:modules ((srfi srfi-1)
484 ,@%gnu-build-system-modules)
486 (modify-phases %standard-phases
487 (add-after 'build 'make-doc
489 (invoke "make" "CC=gcc" "RM=rm" "SHELL=sh" "manual")))
490 (add-before 'make-doc 'fix-doc
492 (substitute* "doc/Makefile" (("/bin/rm") (which "rm")))
493 (substitute* (find-files "doc" "\\.tex")
494 (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}"
496 (string-append "\\includegraphics[scale=" scale "]{"
498 (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}"
500 (string-append "\\includegraphics[width=" width "]{"
502 (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}"
504 (string-append "\\includegraphics[height=" height "]{"
506 (("\\\\psfig\\{figure=([^,]*)\\}" all file)
507 (string-append "\\includegraphics{" file "}")))
508 (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex")
509 (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}"
511 (string-append "\\documentclass[" options "]{"
513 "\\usepackage{graphicx}\n"
514 "\\usepackage{robinspace}"))
515 (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all)
516 (string-append "%" all))
517 (("\\\\setstretch\\{.*\\}" all)
518 (string-append "%" all)))
521 (add-before 'install 'clean-bin
523 (delete-file (string-append (getcwd) "/bin/README"))
525 (add-before 'install 'make-pdf
527 (setenv "HOME" "/tmp") ; FIXME: for texlive font cache
528 (with-directory-excursion "doc"
530 (for-each (lambda (file)
531 (invoke "dvips" file "-o"))
532 (find-files "." "\\.dvi"))
533 (for-each (lambda (file)
534 (invoke "ps2pdf" file))
535 '("mtt.ps" "ug.ps" "tcad.ps"))
536 (invoke "make" "clean")))))
538 (lambda* (#:key outputs #:allow-other-keys)
539 (let* ((out (assoc-ref outputs "out"))
540 (data (string-append out "/share"))
541 (bin (string-append out "/bin"))
542 (doc (string-append data "/doc/" ,name "-" ,version))
543 (examples (string-append doc "/examples")))
544 (with-directory-excursion "bin"
545 (for-each (lambda (f)
546 (install-file f bin))
547 (find-files "." ".*")))
548 (copy-recursively "doc" doc)
549 (copy-recursively "examples" examples)
551 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
552 (synopsis "Multipole-accelerated capacitance extraction program")
554 "Fastcap is a capacitance extraction program based on a
555 multipole-accelerated algorithm.")
556 (license (license:non-copyleft #f "See fastcap.c."))))
558 (define-public fasthenry
561 (version "3.0-12Nov96")
564 (file-name (string-append name "-" version ".tar.gz"))
566 "http://www.rle.mit.edu/cpg/codes/" name
567 "-" version ".tar.z"))
569 (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
570 (patches (search-patches "fasthenry-spAllocate.patch"
571 "fasthenry-spBuild.patch"
572 "fasthenry-spUtils.patch"
573 "fasthenry-spSolve.patch"
574 "fasthenry-spFactor.patch"))))
575 (build-system gnu-build-system)
577 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
579 #:tests? #f ;; no tests-suite
580 #:modules ((srfi srfi-1)
581 ,@%gnu-build-system-modules)
583 (modify-phases %standard-phases
586 (lambda* (#:key outputs #:allow-other-keys)
587 (let* ((out (assoc-ref outputs "out"))
588 (data (string-append out "/share"))
589 (bin (string-append out "/bin"))
590 (doc (string-append data "/doc/" ,name "-" ,version))
591 (examples (string-append doc "/examples")))
592 (with-directory-excursion "bin"
593 (for-each (lambda (f)
594 (install-file f bin))
595 (find-files "." ".*")))
596 (copy-recursively "doc" doc)
597 (copy-recursively "examples" examples)
599 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
600 (synopsis "Multipole-accelerated inductance analysis program")
602 "Fasthenry is an inductance extraction program based on a
603 multipole-accelerated algorithm.")
604 (license (license:non-copyleft #f "See induct.c."))))
606 (define-public fritzing
613 (url "https://github.com/fritzing/fritzing-app")
615 (file-name (git-file-name name version))
618 "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
619 (build-system gnu-build-system)
622 (modify-phases %standard-phases
624 (lambda* (#:key inputs outputs #:allow-other-keys)
625 (copy-recursively (assoc-ref inputs "fritzing-parts-db")
627 ;; Make compatible with libgit2 > 0.24
628 (substitute* "src/version/partschecker.cpp"
629 (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
630 "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
632 ;; Use system libgit2 and boost.
633 (substitute* "phoenix.pro"
634 (("^LIBGIT2INCLUDE =.*")
635 (string-append "LIBGIT2INCLUDE="
636 (assoc-ref inputs "libgit2") "/include\n"))
637 (("^ LIBGIT2LIB =.*")
638 (string-append " LIBGIT2LIB="
639 (assoc-ref inputs "libgit2") "/lib\n")))
640 ;; This file checks for old versions of Boost, insisting on
641 ;; having us download the boost sources and placing them in the
643 (substitute* "pri/utils.pri"
644 (("error\\(") "message("))
646 (let ((out (assoc-ref outputs "out")))
648 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib")
649 (string-append "PREFIX=" out)
653 ("qtserialport" ,qtserialport)
662 (url "https://github.com/fritzing/fritzing-parts")
664 (file-name (git-file-name "fritzing-parts" version))
667 "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
668 (home-page "https://fritzing.org")
669 (synopsis "Electronic circuit design")
671 "The Fritzing application is @dfn{Electronic Design Automation} (EDA)
672 software with a low entry barrier, suited for the needs of makers and
673 hobbyists. It offers a unique real-life \"breadboard\" view, and a parts
674 library with many commonly used high-level components. Fritzing makes it very
675 easy to communicate about circuits, as well as to turn them into PCB layouts
676 ready for production.")
677 ;; Documentation and parts are released under CC-BY-SA 3.0; source code is
678 ;; released under GPLv3+.
679 (license (list license:gpl3+ license:cc-by-sa3.0))))
687 (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-"
688 version "/gerbv-" version ".tar.gz"))
691 "1d2k43k7i4yvbpi4sw1263a8d0q98z2n7aqhmpinpkih8a681vn5"))))
692 (build-system gnu-build-system)
694 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
695 ("desktop-file-utils" ,desktop-file-utils)
696 ("pkg-config" ,pkg-config)))
700 (home-page "http://gerbv.geda-project.org/")
701 (synopsis "Gerber file viewer")
703 "Gerbv is a viewer for files in the Gerber format (RS-274X only), which
704 is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets
705 you load several files on top of each other, do measurements on the displayed
706 image, etc. Besides viewing Gerbers, you may also view Excellon drill files
707 as well as pick-place files.")
708 (license license:gpl2+)))
710 (define-public translate2geda
711 ;; There has been no formal release yet.
712 (let ((commit "4c19e7eefa338cea8f1ee999ea8b37f8d0698169")
715 (name "translate2geda")
716 (version (git-version "0" revision commit))
720 (url "https://github.com/erichVK5/translate2geda")
722 (file-name (git-file-name name version))
725 "1h062bbpw8nk0jamkya1k4lsgaia796jyviiz2gkdi6k1bxhwgpa"))))
726 (build-system ant-build-system)
728 `(#:tests? #f ; there are no tests
729 #:jar-name "translate2geda.jar"
731 #:main-class "translate2geda"
733 (modify-phases %standard-phases
734 (add-after 'install 'install-bin
735 (lambda* (#:key inputs outputs #:allow-other-keys)
736 (let* ((out (assoc-ref outputs "out"))
737 (bin (string-append out "/bin"))
738 (wrapper (string-append bin "/translate2geda")))
740 (with-output-to-file wrapper
742 (format #t "#!/bin/sh~%exec ~a -jar ~a/share/java/translate2geda.jar"
743 (which "java") out)))
744 (chmod wrapper #o555))
746 (home-page "https://github.com/erichVK5/translate2geda")
747 (synopsis "Utility for converting symbol and footprint formats to gEDA")
749 "This package provides a utility for converting Kicad (@file{.mod},
750 @file{.lib}), Eagle (@file{.lbr}), gerber (@file{.gbr}, etc..),
751 BXL (@file{.bxl}), IBIS (@file{.ibs}), symdef, LT-Spice (@file{.asc}),
752 QUCS (@file{.sch}), and BSDL (@file{.bsd}) symbols and footprints and EggBot
754 (license license:gpl2+))))
756 (define-public libfive
757 (let ((commit "6e39254e57c179459bb929df49ae96a6017a0ed6")
761 (version (git-version "0" revision commit))
765 (url "https://github.com/libfive/libfive")
769 "0ryv2hcbrwqc087w7rrs4a2irkcpmqync00g4dh8n7jn10w2jkim"))
770 (file-name (git-file-name name version))))
771 (build-system cmake-build-system)
773 `(#:test-target "libfive-test"
775 (modify-phases %standard-phases
776 (add-after 'unpack 'remove-native-compilation
778 (substitute* "CMakeLists.txt" (("-march=native") ""))
781 `(("pkg-config" ,pkg-config)))
787 ("guile" ,guile-2.2)))
788 (home-page "https://libfive.com")
789 (synopsis "Tool for programmatic computer-aided design")
791 "Libfive is a tool for programmatic computer-aided design (CAD). In
792 libfive, solid models are defined as Scheme scripts, and there are no opaque
793 function calls into the geometry kernel: everything is visible to the user.
794 Even fundamental, primitive shapes are represented as code in the user-level
796 (license (list license:mpl2.0 ;library
797 license:gpl2+))))) ;Guile bindings and GUI
799 (define-public inspekt3d
800 (let ((commit "703f52ccbfedad2bf5240bf8183d1b573c9d54ef")
804 (version (git-version "0" revision commit))
808 (url "https://gitlab.com/kavalogic-inc/inspekt3d.git")
810 (file-name (git-file-name name version))
813 "0lan6930g5a9z4ack9jj0zdd0mb2s6q2xzpiwcjdc3pvl9b1nbw4"))))
814 (build-system gnu-build-system)
817 (modify-phases %standard-phases
818 (add-after 'unpack 'patch-libfive-guile-location
819 (lambda* (#:key inputs #:allow-other-keys)
820 (substitute* "inspekt3d/library.scm"
823 (assoc-ref inputs "libfive")
824 "/lib/libfive-guile")))
827 `(("autoconf" ,autoconf)
828 ("automake" ,automake)
829 ("pkg-config" ,pkg-config)))
832 ("guile" ,guile-2.2)))
834 `(("libfive" ,libfive)
835 ("guile-opengl" ,guile-opengl)))
836 (home-page "https://gitlab.com/kavalogic-inc/inspekt3d/")
837 (synopsis "Lightweight 3D viewer for Libfive written in Guile Scheme")
839 "Inspekt3d is a lightweight 3D viewer for Libfive written in Guile Scheme.
840 The viewer can be used interactively with a REPL (for example Geiser in
842 (license license:gpl3+))))
844 ;; TODO Add doc https://gitlab.com/kicad/services/kicad-doc/-/tree/master
853 (url "https://gitlab.com/kicad/code/kicad.git")
856 (base32 "1pa3z0h0679jmgxlzc833h6q85b5paxdp69kf2h93vkaryj58622"))
857 (file-name (git-file-name name version))))
858 (build-system cmake-build-system)
860 `(#:out-of-source? #t
861 #:tests? #f ; no tests
862 #:build-type "Release"
864 (list "-DKICAD_SCRIPTING_PYTHON3=ON"
865 "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON"
866 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE")
868 (modify-phases %standard-phases
869 (add-after 'install 'install-translations
870 (lambda* (#:key inputs outputs #:allow-other-keys)
871 (copy-recursively (assoc-ref inputs "kicad-i18n")
872 (assoc-ref outputs "out"))
874 (add-after 'install 'wrap-program
875 ;; Ensure correct Python at runtime.
876 (lambda* (#:key inputs outputs #:allow-other-keys)
877 (let* ((out (assoc-ref outputs "out"))
878 (python (assoc-ref inputs "python"))
879 (file (string-append out "/bin/kicad"))
883 ,(version-major+minor
884 (package-version python))
886 (getenv "PYTHONPATH"))))
888 `("PYTHONPATH" ":" prefix (,path))
890 (,(string-append python "/bin:")))))
893 (list (search-path-specification
894 (variable "KICAD_TEMPLATE_DIR")
895 (files '("share/kicad/template")))
896 (search-path-specification
897 (variable "KICAD_SYMBOL_DIR") ; symbol path
898 (files '("share/kicad/library")))
899 (search-path-specification
900 (variable "KISYSMOD") ; footprint path
901 (files '("share/kicad/modules")))
902 (search-path-specification
903 (variable "KISYS3DMOD") ; 3D model path
904 (files '("share/kicad/modules/packages3d")))))
907 ("desktop-file-utils" ,desktop-file-utils)
908 ("gettext" ,gettext-minimal)
909 ("kicad-i18n" ,kicad-i18n)
910 ("pkg-config" ,pkg-config)
918 ("hicolor-icon-theme" ,hicolor-icon-theme)
919 ("libngspice" ,libngspice)
922 ("opencascade-oce" ,opencascade-oce)
924 ("python" ,python-wrapper)
925 ("wxwidgets" ,wxwidgets)
926 ("wxpython" ,python-wxpython)))
927 (home-page "https://kicad-pcb.org/")
928 (synopsis "Electronics Design Automation Suite")
929 (description "Kicad is a program for the formation of printed circuit
930 boards and electrical circuits. The software has a number of programs that
931 perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing
932 electrical diagrams), gerbview (viewing Gerber files) and others.")
933 (license license:gpl3+)))
938 (version (package-version kicad))
942 (url "https://gitlab.com/kicad/code/kicad-i18n.git")
944 (file-name (git-file-name name version))
947 "0qryi8xjm23ka363zfl7bbga0v5c31fr3d4nyxp3m168vkv9zhha"))))
948 (build-system cmake-build-system)
951 (modify-phases %standard-phases
955 `(("gettext" ,gettext-minimal)))
956 (home-page (package-home-page kicad))
957 (synopsis "KiCad GUI translations")
958 (description "This package contains the po files that are used for the GUI
959 translations for KiCad.")
960 (license license:gpl3+)))
962 (define-public kicad-i18l
963 (deprecated-package "kicad-i18l" kicad-i18n))
965 (define-public kicad-symbols
967 (name "kicad-symbols")
968 (version (package-version kicad))
972 (url "https://github.com/KiCad/kicad-symbols")
974 (file-name (git-file-name name version))
977 "12w3rdy085drlikkpb27n9ni7cyg9l0pqy7hnr86cxjcw3l5wcx6"))))
978 (build-system cmake-build-system)
980 `(#:tests? #f)) ; no tests exist
981 (home-page (package-home-page kicad))
982 (synopsis "Official KiCad schematic symbol libraries")
983 (description "This package contains the official KiCad schematic symbol
985 ;; TODO: Exception: "To the extent that the creation of electronic designs
986 ;; that use 'Licensed Material' can be considered to be 'Adapted Material',
987 ;; then the copyright holder waives article 3 of the license with respect to
988 ;; these designs and any generated files which use data provided as part of
989 ;; the 'Licensed Material'."
990 ;; See <https://github.com/KiCad/kicad-symbols/blob/master/LICENSE.md>.
991 (license license:cc-by-sa4.0)))
993 (define-public kicad-footprints
995 (inherit kicad-symbols)
996 (name "kicad-footprints")
997 (version (package-version kicad))
1001 (url "https://github.com/KiCad/kicad-footprints")
1003 (file-name (git-file-name name version))
1006 "1kmf91a5mmvj9izrv40mkaw1w36yjgn8daczd9rq2wlmd0rdp1zx"))))
1007 (synopsis "Official KiCad footprint libraries")
1008 (description "This package contains the official KiCad footprint libraries.")))
1010 (define-public kicad-packages3d
1012 (inherit kicad-symbols)
1013 (name "kicad-packages3d")
1014 (version (package-version kicad))
1018 (url "https://github.com/KiCad/kicad-packages3d")
1020 (file-name (git-file-name name version))
1023 "0b9jglf77fy0n0r8xs4yqkv6zvipyfvp0z5dnqlzp32csy5aqpi1"))))
1024 (synopsis "Official KiCad 3D model libraries")
1025 (description "This package contains the official KiCad 3D model libraries.")))
1027 (define-public kicad-templates
1029 (inherit kicad-symbols)
1030 (name "kicad-templates")
1031 (version (package-version kicad))
1035 (url "https://github.com/KiCad/kicad-templates")
1037 (file-name (git-file-name name version))
1040 "1hppcsrkn4dk6ggby6ckh0q65qxkywrbyxa4lwpaf7pxjyv498xg"))))
1041 (synopsis "Official KiCad project and worksheet templates")
1042 (description "This package contains the official KiCad project and
1043 worksheet templates.")))
1045 (define-public linsmith
1052 "mirror://sourceforge/linsmith/linsmith/linsmith-"
1053 version "/linsmith-" version ".tar.gz"))
1056 "13qj7n9826qc9shkkgd1p6vcpj78v4h9d67wbg45prg7rbnzkzds"))))
1057 (build-system gnu-build-system)
1059 `(("pkg-config" ,pkg-config)
1061 ("libgnome" ,libgnomeui)))
1062 (home-page "https://jcoppens.com/soft/linsmith/index.en.php")
1063 (synopsis "Smith Charting program")
1064 (description "LinSmith is a Smith Charting program, mainly designed for
1065 educational use. As such, there is an emphasis on capabilities that improve
1066 the 'showing the effect of'-style of operation.")
1067 (license license:gpl2+)))
1076 (uri (string-append "https://www.libvolk.org/releases/volk-"
1079 (base32 "1pjxz3piwy49njj5y2zk437prwkv9lfs5g48577jj3kcsg766vi3"))))
1080 (build-system cmake-build-system)
1083 (modify-phases %standard-phases
1084 (add-after 'install 'wrap-pythonpath
1085 (lambda* (#:key inputs outputs #:allow-other-keys)
1086 (let* ((out (assoc-ref outputs "out"))
1087 (python (assoc-ref inputs "python"))
1088 (file (string-append out "/bin/volk_modtool"))
1089 (path (string-append
1092 ,(version-major+minor
1093 (package-version python))
1095 (getenv "PYTHONPATH"))))
1097 `("PYTHONPATH" ":" prefix (,path))
1099 (,(string-append python "/bin:")))))
1103 ("python" ,python-wrapper)
1104 ("python-mako" ,python-mako)))
1105 (home-page "https://www.libvolk.org/")
1106 (synopsis "Vector-Optimized Library of Kernels")
1108 "@acronym{VOLK, Vector-Optimized Library of Kernels} contains procedures
1109 with machine-specific optimizations for mathematical functions. It also
1110 provides a machine-independent interface to select the best such procedures to
1111 use on a given system.")
1112 (license license:gpl3+)))
1114 (define-public libredwg
1121 (uri (string-append "mirror://gnu/libredwg/libredwg-"
1124 (base32 "1vd7ii32k5447z7k4w9s005hv1ffpj6dyf1w40x6c53qksrblny2"))))
1125 (build-system gnu-build-system)
1127 `(#:configure-flags '("--disable-bindings")))
1129 `(("libxml2" ,libxml2)
1130 ("parallel" ,parallel)
1131 ("pkg-config" ,pkg-config)
1133 ("python-libxml2" ,python-libxml2)))
1135 `(("pcre2" ,pcre2)))
1136 (home-page "https://www.gnu.org/software/libredwg/")
1137 (synopsis "C library to handle DWG (CAD-related) files")
1139 "GNU LibreDWG is a C library to handle DWG files. It aims to be a free
1140 replacement for the OpenDWG libraries.")
1141 (license license:gpl3+)))
1143 (define-public minicom
1151 (url "https://salsa.debian.org/minicom-team/minicom.git")
1152 (commit (string-append "v" version))))
1154 (base32 "0f36wv015zpz1x895qv0z6marlynzyh0d5mfkyd7lfyy2xd1i2w0"))
1155 (file-name (git-file-name name version))))
1156 (build-system gnu-build-system)
1158 `(#:configure-flags '("--enable-lock-dir=/var/lock")
1160 (modify-phases %standard-phases
1162 ;; autogen.sh needlessly hard-codes aclocal-1.14.
1164 (invoke "autoreconf" "-vif")
1166 (add-before 'configure 'patch-lock-check
1168 (substitute* "configure"
1169 (("test -d [$]UUCPLOCK") "true"))
1172 `(("autoconf" ,autoconf)
1173 ("automake" ,automake)
1174 ("gettext" ,gettext-minimal)
1175 ("pkg-config" ,pkg-config)))
1177 `(("ncurses" ,ncurses)))
1178 (home-page "https://salsa.debian.org/minicom-team/minicom")
1179 (synopsis "Serial terminal emulator")
1180 (description "@code{minicom} is a serial terminal emulator.")
1181 (license license:gpl2+)))
1183 (define-public harminv
1190 (string-append "https://github.com/stevengj/harminv/"
1191 "releases/download/v" version "/"
1192 name "-" version ".tar.gz"))
1195 "0w1n4d249vlpda0hi6z1v13qp21vlbp3ykn0m8qg4rd5132j7fg1"))))
1196 (build-system gnu-build-system)
1198 `(#:configure-flags '("--enable-shared")
1200 (modify-phases %standard-phases
1201 (add-before 'configure 'fix-tests
1203 (substitute* "./sines-test.sh"
1204 ; change test frequency range - default fails
1205 (("0\\.15") "0.16"))
1208 `(("fortran" ,gfortran)))
1210 `(("lapack" ,lapack)))
1211 (home-page "https://github.com/stevengj/harminv")
1212 (synopsis "Harmonic inversion solver")
1214 "Harminv is a free program (and accompanying library) to solve the problem of
1215 harmonic inversion — given a discrete-time, finite-length signal that consists of a sum
1216 of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
1217 determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
1218 (license license:gpl2+)))
1220 (define-public guile-libctl
1222 (name "guile-libctl")
1228 "https://github.com/NanoComp/libctl/releases/download/v"
1229 version "/libctl-" version ".tar.gz"))
1232 "0x8r56lpfq83kfbq28vr25icl19xpfd6fjrxzcpdmv30l9pash83"))))
1233 (build-system gnu-build-system)
1235 `(#:configure-flags '("--enable-shared")))
1237 `(("fortran" ,gfortran)))
1239 `(("guile" ,guile-2.2)))
1240 (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl")
1241 (synopsis "Flexible control files implementation for scientific simulations")
1243 "Libctl is a Guile-based library implementing flexible control files
1244 for scientific simulations.")
1245 (license license:gpl2+)))
1255 "https://github.com/NanoComp/mpb/releases/download/v"
1256 version "/mpb-" version ".tar.gz"))
1259 "1jgrb7dd6qs6j6y1gnxmdgrh79l2bvqa6nk60a4pw1annsks4brd"))))
1260 (build-system gnu-build-system)
1263 (list (string-append "--with-libctl="
1264 (assoc-ref %build-inputs "libctl")
1266 "--enable-shared")))
1268 `(("fortran" ,gfortran)
1269 ("pkg-config" ,pkg-config)
1274 ("guile" ,guile-2.2)
1277 ("libctl" ,guile-libctl)
1278 ("readline" ,readline)
1280 (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands")
1281 (synopsis "Computes band structures and electromagnetic modes of dielectric
1284 "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes)
1285 of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
1286 fully-vectorial and three-dimensional methods.")
1287 (license license:gpl2+)))
1297 "https://github.com/NanoComp/meep/releases/download/v"
1298 version "/meep-" version ".tar.gz"))
1301 "14zyxmm3p80j5fz5b89sl7hgkgcisqjny5hjh4pi274ziqjqz8bm"))))
1302 (build-system gnu-build-system)
1305 (list (string-append "--with-libctl="
1306 (assoc-ref %build-inputs "libctl")
1309 `(("fortran" ,gfortran)
1310 ("pkg-config" ,pkg-config)
1315 ("guile" ,guile-2.2)
1316 ("harminv" ,harminv)
1319 ("libctl" ,guile-libctl)
1322 (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep")
1323 (synopsis "Finite-difference time-domain (FDTD) simulation software")
1325 "Meep is a finite-difference time-domain (FDTD) simulation software package
1326 developed at MIT to model electromagnetic systems.")
1327 (license license:gpl2+)))
1336 (url "https://github.com/Qucs/ADMS")
1337 (commit (string-append "release-" version))))
1338 (file-name (git-file-name name version))
1341 "0i37c9k6q1iglmzp9736rrgsnx7sw8xn3djqbbjw29zsyl3pf62c"))))
1342 (build-system gnu-build-system)
1344 `(("autoconf" ,autoconf)
1345 ("automake" ,automake)
1348 ("libtool" ,libtool)
1350 ("perl-xml-libxml" ,perl-xml-libxml)))
1351 (home-page "https://github.com/Qucs/ADMS")
1352 (synopsis "Automatic device model synthesizer")
1354 "ADMS is a code generator that converts electrical compact device models
1355 specified in high-level description language into ready-to-compile C code for
1356 the API of spice simulators. Based on transformations specified in XML
1357 language, ADMS transforms Verilog-AMS code into other target languages.")
1358 (license license:gpl3)))
1360 (define-public capstone
1367 (url "https://github.com/aquynh/capstone")
1369 (file-name (git-file-name name version))
1372 "0dgf82kxj4rs45d6s8sr984c38sll1n5scpypjlyh21gh2yl4qfw"))))
1373 (build-system gnu-build-system)
1376 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1379 (modify-phases %standard-phases
1380 (delete 'configure) ; no configure script
1381 ;; cstool's Makefile ‘+=’s LDFLAGS, so we cannot pass it as a make flag.
1382 (add-before 'build 'fix-cstool-ldflags
1383 (lambda* (#:key outputs #:allow-other-keys)
1384 (setenv "LDFLAGS" (string-append "-Wl,-rpath="
1385 (assoc-ref outputs "out") "/lib"))
1387 (home-page "https://www.capstone-engine.org")
1388 (synopsis "Lightweight multi-platform, multi-architecture disassembly framework")
1390 "Capstone is a lightweight multi-platform, multi-architecture disassembly
1391 framework. Capstone can disassemble machine code for many supported architectures
1392 such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and xcore. It provides
1393 bindings for Python, Java, OCaml and more.")
1394 (license license:bsd-3)))
1396 ;; FIXME: This package has a timestamp embedded in
1397 ;; lib/python3.5/site-packages/capstone/__pycache__/__iti__.cpython-35.pyc
1398 (define-public python-capstone
1401 (name "python-capstone")
1403 `(("capstone" ,capstone)))
1404 (build-system python-build-system)
1407 (modify-phases %standard-phases
1408 (add-after 'unpack 'chdir-and-fix-setup-py
1410 (chdir "bindings/python")
1411 ;; Do not build the library again, because we already have it.
1412 (substitute* "setup.py" ((".* build_libraries.*") ""))
1413 ;; This substitution tells python-capstone where to find the
1415 (substitute* "capstone/__init__.py"
1416 (("pkg_resources.resource_filename.*")
1417 (string-append "'" (assoc-ref %build-inputs "capstone") "/lib',\n")))
1420 (define-public python2-capstone
1421 (package-with-python2 python-capstone))
1423 (define-public radare2
1430 (url "https://github.com/radareorg/radare2")
1434 "0gwdnrnk7wdgkajp2qwg4fyplh7nsbmf01bzx07px6xmiscd9z2s"))
1435 (file-name (git-file-name name version))))
1436 (build-system gnu-build-system)
1438 '(#:tests? #f ; tests require git and network access
1440 (modify-phases %standard-phases
1441 (add-before 'configure 'mklibdir
1442 (lambda* (#:key inputs outputs #:allow-other-keys)
1443 (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))
1446 (list "--with-openssl"
1448 "--with-syscapstone"
1454 ;; TODO: Add gmp and libzip and make the build system actually find them.
1456 `(("capstone" ,capstone)
1458 ("openssl" ,openssl)
1461 `(("pkg-config" ,pkg-config)))
1463 ;; In the Libs: section of r_hash.pc.
1464 `(("xxhash" ,xxhash)))
1465 (home-page "https://radare.org/")
1466 (synopsis "Reverse engineering framework")
1468 "Radare2 is a complete framework for reverse-engineering, debugging, and
1469 analyzing binaries. It is composed of a set of small utilities that can be
1470 used together or independently from the command line.
1472 Radare2 is built around a scriptable disassembler and hexadecimal editor that
1473 support a variety of executable formats for different processors and operating
1474 systems, through multiple back ends for local and remote files and disk
1477 It can also compare (@dfn{diff}) binaries with graphs and extract information
1478 like relocation symbols. It is able to deal with malformed binaries, making
1479 it suitable for security research and analysis.")
1480 (license license:lgpl3)))
1488 (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
1492 "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
1493 (build-system gnu-build-system)
1495 `(#:tests? #f ; no tests
1496 #:make-flags '("all" "asco-mpi")
1498 (modify-phases %standard-phases
1500 (add-before 'build 'fix-paths
1501 (lambda* (#:key inputs #:allow-other-keys)
1502 (let ((coreutils (assoc-ref inputs "coreutils-minimal")))
1503 (substitute* '("errfunc.c" "asco.c")
1505 (string-append coreutils "/bin/cp "))
1507 (string-append coreutils "/bin/nice")))
1508 (substitute* "Makefile"
1509 (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
1511 (replace 'install ; no install target
1512 (lambda* (#:key outputs #:allow-other-keys)
1513 (for-each (lambda (file)
1514 (install-file file (string-append
1515 (assoc-ref outputs "out")
1517 '("asco" "asco-mpi" "asco-test"
1518 "tools/alter/alter" "tools/log/log"))
1521 `(("mpi" ,openmpi)))
1523 `(("coreutils-minimal" ,coreutils-minimal)))
1524 (home-page "http://asco.sourceforge.net/")
1525 (synopsis "SPICE circuit optimizer")
1527 "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
1528 high-performance parallel differential evolution (DE) optimization algorithm.")
1529 (license license:gpl2+)))
1531 (define-public libngspice
1532 ;; Note: The ngspice's build system does not allow us to build both the
1533 ;; library and the executables in one go. Thus, we have two packages.
1534 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>.
1540 (uri (string-append "mirror://sourceforge/ngspice/ng-spice-rework/"
1541 version "/ngspice-" version ".tar.gz"))
1544 "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l"))
1545 (modules '((guix build utils)))
1546 ;; We remove the non-free cider and build without it.
1549 (delete-file-recursively "src/ciderlib")
1550 (delete-file "src/ciderinit")
1551 (substitute* "configure"
1552 (("src/ciderlib/Makefile") "")
1553 (("src/ciderlib/input/Makefile") "")
1554 (("src/ciderlib/support/Makefile") "")
1555 (("src/ciderlib/oned/Makefile") "")
1556 (("src/ciderlib/twod/Makefile") ""))
1558 (build-system gnu-build-system)
1560 `(;; No tests for libngspice exist.
1561 ;; The transient tests for ngspice fail.
1564 (modify-phases %standard-phases
1565 (add-after 'unpack 'patch-timestamps
1567 (substitute* "configure"
1568 (("`date`") "Thu Jan 1 00:00:01 UTC 1970"))
1570 (add-after 'unpack 'delete-program-manuals
1572 (substitute* "man/man1/Makefile.in"
1573 (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1 ngmultidec\\.1")
1576 (add-after 'install 'delete-script-files
1577 (lambda* (#:key outputs #:allow-other-keys)
1578 (delete-file-recursively
1579 (string-append (assoc-ref outputs "out")
1580 "/share/ngspice/scripts")))))
1582 (list "--enable-openmp"
1585 "--with-readline=yes")))
1590 `(("libxaw" ,libxaw)
1592 ("readline" ,readline)))
1593 (home-page "http://ngspice.sourceforge.net/")
1594 (synopsis "Mixed-level/mixed-signal circuit simulator")
1596 "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes
1597 @code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that
1598 provides code modeling support and simulation of digital components through
1599 an embedded event driven algorithm.")
1600 (license (list license:lgpl2.0+ ; code in frontend/numparam
1601 (license:non-copyleft "file:///COPYING") ; spice3 bsd-style
1602 license:public-domain)))) ; xspice
1604 (define-public ngspice
1605 ;; The ngspice executables (see libngpsice above.)
1606 (package (inherit libngspice)
1609 (substitute-keyword-arguments (package-arguments libngspice)
1610 ((#:configure-flags flags)
1611 `(delete "--with-ngshared" ,flags))
1613 `(modify-phases ,phases
1614 (add-after 'unpack 'delete-include-files
1616 (substitute* "src/Makefile.in"
1617 (("^SUBDIRS = misc maths frontend spicelib include/ngspice")
1618 "SUBDIRS = misc maths frontend spicelib"))
1620 (add-after 'install 'delete-cmpp-dlmain
1621 (lambda* (#:key outputs #:allow-other-keys)
1622 (for-each (lambda (file)
1624 (string-append (assoc-ref outputs "out")
1626 '("/bin/cmpp" "/share/ngspice/dlmain.c"))
1628 (delete 'delete-program-manuals)
1629 (delete 'delete-script-files)))))
1631 `(("libngspice" ,libngspice)
1632 ("readline" ,readline)))))
1634 (define trilinos-serial-xyce
1635 ;; Note: This is a Trilinos containing only the packages Xyce needs, so we
1636 ;; keep it private. See
1637 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#248>.
1638 ;; TODO: Remove when we have modular Trilinos packages?
1640 (name "trilinos-serial-xyce")
1643 (origin (method url-fetch)
1644 (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
1645 version "-Source.tar.gz"))
1648 "1zgrcksrcbmyy79mbdv0j4j4sh0chpigxk8vcrrwgaxyxwxxhrvw"))))
1649 (build-system cmake-build-system)
1651 `(#:out-of-source? #t
1653 (modify-phases %standard-phases
1654 ;; Delete unneeded tribits(build system) directory which makes validate-runpath
1656 (add-before 'validate-runpath 'delete-tribits
1657 (lambda* (#:key outputs #:allow-other-keys)
1658 (delete-file-recursively
1659 (string-append (assoc-ref outputs "out")
1660 "/lib/cmake/tribits"))
1663 (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
1664 "-DCMAKE_C_FLAGS=-O3 -fPIC"
1665 "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
1666 "-DTrilinos_ENABLE_NOX=ON"
1667 "-DNOX_ENABLE_LOCA=ON"
1668 "-DTrilinos_ENABLE_EpetraExt=ON"
1669 "-DEpetraExt_BUILD_BTF=ON"
1670 "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
1671 "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
1672 "-DTrilinos_ENABLE_TrilinosCouplings=ON"
1673 "-DTrilinos_ENABLE_Ifpack=ON"
1674 "-DTrilinos_ENABLE_Isorropia=ON"
1675 "-DTrilinos_ENABLE_AztecOO=ON"
1676 "-DTrilinos_ENABLE_Belos=ON"
1677 "-DTrilinos_ENABLE_Teuchos=ON"
1678 "-DTeuchos_ENABLE_COMPLEX=ON"
1679 "-DTrilinos_ENABLE_Amesos=ON"
1680 "-DAmesos_ENABLE_KLU=ON"
1681 "-DAmesos_ENABLE_UMFPACK=ON"
1682 "-DTrilinos_ENABLE_Sacado=ON"
1683 "-DTrilinos_ENABLE_Kokkos=OFF"
1684 "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
1685 "-DTPL_ENABLE_AMD=ON"
1686 "-DTPL_ENABLE_UMFPACK=ON"
1687 "-DTPL_ENABLE_BLAS=ON"
1688 "-DTPL_ENABLE_LAPACK=ON")))
1690 `(("fortran" ,gfortran)
1695 ("suitesparse" ,suitesparse)))
1696 (home-page "https://trilinos.org")
1697 (synopsis "Engineering and scientific problems algorithms")
1699 "The Trilinos Project is an effort to develop algorithms and enabling
1700 technologies within an object-oriented software framework for the solution of
1701 large-scale, complex multi-physics engineering and scientific problems. A
1702 unique design feature of Trilinos is its focus on packages.")
1703 (license (list license:lgpl2.1+
1706 (define-public xyce-serial
1708 (name "xyce-serial")
1711 (origin (method url-fetch)
1712 (uri (string-append "https://archive.org/download/Xyce-"
1713 version "/Xyce-" version ".tar.gz"))
1716 "09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
1717 (build-system gnu-build-system)
1723 (string-append "ARCHDIR="
1724 (assoc-ref %build-inputs "trilinos")))))
1726 `(("bison" ,bison-3.0) ;'configure' fails with Bison 3.4
1728 ("fortran" ,gfortran)))
1731 ("suitesparse" ,suitesparse)
1733 ("trilinos" ,trilinos-serial-xyce)))
1734 (home-page "https://xyce.sandia.gov/")
1735 (synopsis "High-performance analog circuit simulator")
1737 "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
1738 capable of solving extremely large circuit problems by supporting large-scale
1739 parallel computing platforms. It also supports serial execution.")
1740 (license license:gpl3+)))
1742 (define trilinos-parallel-xyce
1743 (package (inherit trilinos-serial-xyce)
1744 (name "trilinos-parallel-xyce")
1746 `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
1747 ((#:configure-flags flags)
1748 `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
1749 "-DTrilinos_ENABLE_Zoltan=ON"
1750 "-DTPL_ENABLE_MPI=ON")
1754 ,@(package-inputs trilinos-serial-xyce)))))
1756 (define-public xyce-parallel
1757 (package (inherit xyce-serial)
1758 (name "xyce-parallel")
1760 `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
1761 ((#:configure-flags flags)
1762 `(list "CXXFLAGS=-O3"
1769 (assoc-ref %build-inputs "trilinos")))))))
1771 `(("mpi" ,openmpi)))
1773 `(("trilinos" ,trilinos-parallel-xyce)
1774 ,@(alist-delete "trilinos"
1775 (package-inputs xyce-serial))))))
1777 (define-public freehdl
1783 (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
1787 "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))
1790 ;; Fix build with GCC 7. Patch taken from Arch Linux:
1791 ;; https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/freehdl
1793 (uri "https://git.archlinux.org/svntogit/community.git\
1794 /plain/trunk/build-fix.patch?h=packages/freehdl\
1795 &id=3bb90d64dfe6883e26083cd1fa96226d0d59175a")
1796 (file-name "freehdl-c++-namespace.patch")
1799 "09df3c70rx81rnhlhry1wpdhji274nx9jb74rfprk06l4739zm08")))))))
1800 (build-system gnu-build-system)
1803 (modify-phases %standard-phases
1804 (add-before 'configure 'patch-pkg-config
1805 (lambda* (#:key inputs #:allow-other-keys)
1806 (substitute* "freehdl/freehdl-config"
1808 (string-append (assoc-ref inputs "pkg-config")
1811 (string-append (assoc-ref inputs "coreutils")
1814 (add-after 'patch-pkg-config 'setenv
1815 (lambda* (#:key inputs #:allow-other-keys)
1816 (setenv "CXX" (string-append (assoc-ref inputs "gcc")
1818 (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
1821 (add-after 'setenv 'patch-gvhdl
1823 (substitute* "v2cc/gvhdl.in"
1824 (("--mode=link") "--mode=link --tag=CXX")
1825 (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
1827 (add-after 'patch-gvhdl 'patch-freehdl-gennodes
1828 (lambda* (#:key inputs #:allow-other-keys)
1829 (substitute* "freehdl/freehdl-gennodes.in"
1831 (string-append (assoc-ref inputs "guile") "/bin/guile"))
1832 (("\\(debug") ";(debug")
1833 (("\\(@ ") "(apply-emit")
1834 (("\\(@@ ") "(apply-mini-format"))
1836 (add-after 'configure 'patch-freehdl-pc
1837 (lambda* (#:key inputs #:allow-other-keys)
1838 (substitute* "freehdl.pc"
1840 (string-append "=" (assoc-ref inputs "gcc-toolchain")
1843 (string-append "=" (assoc-ref inputs "libtool")
1846 (add-after 'install-scripts 'make-wrapper
1847 (lambda* (#:key inputs outputs #:allow-other-keys)
1848 (let ((out (assoc-ref outputs "out")))
1849 ;; 'gvhdl' invokes the C compiler directly, so hard-code its
1851 (wrap-program (string-append out "/bin/gvhdl")
1852 `("CPLUS_INCLUDE_PATH" ":" prefix
1853 (,(string-append (assoc-ref inputs "gcc-toolchain")
1855 `("LIBRARY_PATH" ":" prefix
1856 (,(string-append (assoc-ref inputs "gcc-toolchain")
1859 (,(string-append (assoc-ref inputs "gcc-toolchain")
1861 ,(string-append (assoc-ref inputs "coreutils")
1863 (wrap-program (string-append out "/bin/freehdl-config")
1864 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
1867 `(("coreutils" ,coreutils)
1868 ("gcc-toolchain" ,gcc-toolchain)
1869 ("guile" ,guile-2.2)
1871 ("pkg-config" ,pkg-config)
1872 ("libtool" ,libtool)))
1874 `(("pkg-config-native" ,pkg-config)
1875 ("libtool-native" ,libtool)))
1876 (home-page "http://www.freehdl.seul.org/")
1877 (synopsis "VHDL simulator")
1879 "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
1880 VHDL'93 as well as VHDL'87 standards are supported.")
1881 (license (list license:gpl2+
1882 license:lgpl2.0+)))) ; freehdl's libraries
1885 ;; Qucs 0.0.19 segfaults when using glibc-2.26. Temporarily build from git.
1886 ;; TODO: When qucs-0.0.20 is released, revert the commit that introduced this
1887 ;; comment and update the package.
1888 (let ((commit "b4f27d9222568066cd59e4c387c51a35056c99d8")
1892 (version (git-version "0.0.19" revision commit))
1896 (url "https://github.com/Qucs/qucs")
1899 (base32 "10bclay9xhkffmsh4j4l28kj1qpxx0pnxja5vx6305cllnq4r3gb"))
1900 (file-name (string-append name "-" version "-checkout"))))
1901 (build-system gnu-build-system)
1904 (modify-phases %standard-phases
1905 (add-before 'bootstrap 'patch-bootstrap
1907 (for-each patch-shebang
1910 "qucs-doc/bootstrap"
1911 "qucs-core/bootstrap"))
1913 (add-before 'configure 'patch-configure
1914 (lambda* (#:key inputs #:allow-other-keys)
1915 (substitute* "qucs/configure"
1916 (("\\$QTDIR") (assoc-ref inputs "qt4")))
1918 (add-after 'patch-configure 'patch-scripts
1919 (lambda* (#:key inputs outputs #:allow-other-keys)
1920 (substitute* '("qucs/qucs/qucsdigi"
1921 "qucs/qucs/qucsdigilib"
1922 "qucs/qucs/qucsveri")
1924 (string-append (assoc-ref outputs "out") "/bin"))
1926 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
1928 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
1930 (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
1932 (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
1934 (string-append (assoc-ref inputs "sed") "/bin/sed"))
1936 (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
1938 (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
1940 (add-before 'check 'pre-check
1942 ;; The test suite requires a running X server.
1943 (system "Xvfb :1 &")
1944 (setenv "DISPLAY" ":1")
1946 (add-after 'install 'make-wrapper
1947 (lambda* (#:key inputs outputs #:allow-other-keys)
1948 (let ((out (assoc-ref outputs "out")))
1949 ;; 'qucs' directly invokes gcc, hence this wrapping.
1950 (wrap-program (string-append out "/bin/qucs")
1951 `("CPLUS_INCLUDE_PATH" ":" prefix
1952 (,(string-append (assoc-ref inputs "gcc-toolchain")
1955 (,(string-append (assoc-ref inputs "gcc-toolchain")
1957 `("LIBRARY_PATH" ":" prefix
1958 (,(string-append (assoc-ref inputs "gcc-toolchain")
1960 `("ADMSXMLBINDIR" ":" prefix
1961 (,(string-append (assoc-ref inputs "adms") "/bin")))
1962 `("ASCOBINDIR" ":" prefix
1963 (,(string-append (assoc-ref inputs "asco") "/bin")))
1964 `("QUCS_OCTAVE" ":" prefix
1965 (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
1967 #:parallel-build? #f ; race condition
1968 #:configure-flags '("--disable-doc"))) ; we need octave-epstk
1970 `(("autoconf" ,autoconf)
1971 ("automake" ,automake)
1975 ("libtool-native" ,libtool)
1976 ("pkg-config" ,pkg-config)
1977 ("python" ,python-2) ; for tests
1978 ("matplotlib" ,python2-matplotlib) ; for tests
1979 ("numpy" ,python2-numpy) ; for tests
1980 ("xorg-server" ,xorg-server-for-tests))) ; for tests
1984 ("coreutils" ,coreutils)
1985 ("freehdl" ,freehdl)
1986 ("gcc-toolchain" ,gcc-toolchain)
1987 ("iverilog" ,iverilog)
1988 ("libtool" ,libtool)
1989 ("octave" ,octave-cli)
1992 (home-page "http://qucs.sourceforge.net/")
1993 (synopsis "Circuit simulator with graphical user interface")
1995 "Qucs is a circuit simulator with graphical user interface. The software
1996 aims to support all kinds of circuit simulation types---e.g. DC, AC,
1997 S-parameter, transient, noise and harmonic balance analysis. Pure digital
1998 simulations are also supported.")
1999 (license license:gpl2+))))
2001 (define-public qucs-s
2007 (uri (string-append "https://github.com/ra3xdh/qucs_s/archive/"
2009 (file-name (string-append name "-" version ".tar.gz"))
2012 "12m1jwhb9qwvb141qzyskbxnw3wn1x22d02z4b4862p7xvccl5h7"))))
2013 (build-system cmake-build-system)
2015 `(#:tests? #f ; no tests
2017 (modify-phases %standard-phases
2018 (add-before 'configure 'patch-scripts
2019 (lambda* (#:key inputs #:allow-other-keys)
2020 (substitute* '("qucs/qucsdigi"
2024 (string-append (assoc-ref inputs "qucs") "/bin"))
2026 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
2028 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
2030 (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
2032 (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
2034 (string-append (assoc-ref inputs "sed") "/bin/sed"))
2036 (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
2038 (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
2040 (add-after 'patch-scripts 'patch-paths
2041 (lambda* (#:key inputs #:allow-other-keys)
2042 (substitute* "qucs/main.cpp"
2043 (((string-append "QucsSettings\\.Qucsator = QucsSettings\\.BinDir "
2044 "\\+ \"qucsator\" \\+ executableSuffix"))
2045 (string-append "}{ QucsSettings.Qucsator = \""
2046 (assoc-ref inputs "qucs") "/bin/qucsator\""))
2047 (((string-append "QucsSettings\\.XyceExecutable = "
2048 "\"/usr/local/Xyce-Release-6.8.0-OPENSOURCE/bin/Xyce"))
2049 (string-append "}{ QucsSettings.XyceExecutable = \""
2050 (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
2051 (((string-append "else QucsSettings\\.XyceParExecutable = "
2052 "\"mpirun -np %p /usr/local"
2053 "/Xyce-Release-6.8.0-OPENMPI-OPENSOURCE/bin/Xyce"))
2054 (string-append "QucsSettings.XyceParExecutable = \""
2055 (assoc-ref inputs "mpi") "/bin/mpirun -np %p "
2056 (assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
2057 (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
2058 (string-append "QucsSettings.NgspiceExecutable = " "\""
2059 (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
2060 (substitute* "qucs/extsimkernels/ngspice.cpp"
2061 (("share/qucs/xspice_cmlib") "share/qucs-s/xspice_cmlib"))
2062 (substitute* "qucs/qucs_actions.cpp"
2064 (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
2066 (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
2068 (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
2070 (add-after 'install 'install-scripts
2071 (lambda* (#:key inputs outputs #:allow-other-keys)
2074 (let ((file (string-append "../qucs_s-" ,version
2076 (out (assoc-ref outputs "out")))
2077 (install-file file (string-append out "/bin"))
2078 (chmod (string-append out "/bin/" script) #o555)))
2079 '("qucsdigi" "qucsdigilib" "qucsveri"))
2081 (add-after 'install-scripts 'make-wrapper
2082 (lambda* (#:key inputs outputs #:allow-other-keys)
2083 (let* ((out (assoc-ref outputs "out"))
2084 (file (string-append out "/bin/qucs-s"))
2085 (qucs (assoc-ref inputs "qucs"))
2086 (qucsator (string-append qucs "/bin/qucsator")))
2088 `("CPLUS_INCLUDE_PATH" ":" prefix
2089 (,(string-append (assoc-ref inputs "gcc-toolchain")
2092 (,(string-append (assoc-ref inputs "gcc-toolchain")
2094 `("LIBRARY_PATH" ":" prefix
2095 (,(string-append (assoc-ref inputs "gcc-toolchain")
2097 `("QUCSATOR" ":" prefix (,qucsator))
2098 `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
2099 `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms")
2101 `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco")
2103 `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave")
2105 (symlink qucsator (string-append out "/bin/qucsator"))
2108 `(("libtool-native" ,libtool)))
2112 ("coreutils" ,coreutils)
2113 ("freehdl" ,freehdl)
2114 ("gcc-toolchain" ,gcc-toolchain)
2115 ("iverilog" ,iverilog)
2116 ("libtool" ,libtool)
2118 ("ngspice" ,ngspice)
2119 ("octave" ,octave-cli)
2123 ("xyce-serial" ,xyce-serial)
2124 ("xyce-parallel" ,xyce-parallel)))
2125 (home-page "https://ra3xdh.github.io/")
2126 (synopsis "Circuit simulator with graphical user interface")
2128 "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
2129 The S letter indicates SPICE. The purpose of the Qucs-S subproject is to use
2130 free SPICE circuit simulation kernels with the Qucs GUI. It provides the
2131 simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
2132 (license license:gpl2+)))
2134 (define-public librepcb
2141 (uri (string-append "https://download.librepcb.org/releases/"
2142 version "/librepcb-" version "-source.zip"))
2144 (base32 "1b5dkanz3q0y5ag80w0l85hn7axrachb5m9zvyv4zvzrfy09wa88"))))
2145 (build-system gnu-build-system)
2147 `(("qtbase" ,qtbase)
2151 `(("qttools" ,qttools) ; for lrelease
2155 (modify-phases %standard-phases
2157 (lambda* (#:key inputs outputs #:allow-other-keys)
2160 (let ((lrelease (string-append (assoc-ref inputs "qttools")
2162 (out (assoc-ref outputs "out")))
2164 (string-append "QMAKE_LRELEASE=" lrelease)
2165 (string-append "PREFIX=" out)
2166 "../librepcb.pro")))))))
2167 (home-page "https://librepcb.org/")
2168 (synopsis "Electronic Design Automation tool")
2169 (description "LibrePCB is @dfn{Electronic Design Automation} (EDA)
2170 software to develop printed circuit boards. It features human readable file
2171 formats and complete project management with library, schematic and board
2173 (license (list license:gpl3+
2174 license:boost1.0 ; libs/clipper,
2175 ; libs/optional/tests/catch.hpp,
2176 ; libs/sexpresso/tests/catch.hpp
2177 license:expat ; libs/delaunay-triangulation,
2178 ; libs/parseagle, libs/type_safe
2179 license:asl2.0 ; libs/fontobene, libs/googletest,
2181 license:isc ; libs/hoedown
2182 license:cc0 ; libs/optional, libs/sexpresso
2183 license:bsd-2 ; libs/optional/tests/catch.hpp
2184 license:lgpl2.1+)))) ; libs/quazip
2193 (url "https://github.com/markwal/GPX")
2195 (file-name (git-file-name name version))
2198 "1yab269x8qyf7rd04vaxyqyjv4pzz9lp4sc4dwh927k23avr3rw5"))))
2199 (build-system gnu-build-system)
2200 (home-page "https://github.com/markwal/GPX")
2201 (synopsis "Converting gcode to x3g files for 3D printing")
2203 "GPX is a post processing utility for converting gcode output from 3D
2204 slicing software to x3g files for standalone 3D printing on common 3D
2206 (license license:gpl2+)))
2208 (define-public gnucap
2211 (version "20171003")
2215 (uri (string-append "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-"
2219 "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g"))))
2220 (build-system gnu-build-system)
2222 `(("readline" ,readline)))
2225 (modify-phases %standard-phases
2227 (lambda* (#:key outputs #:allow-other-keys)
2228 (let ((out (assoc-ref outputs "out")))
2229 ;; Set correct rpath so that gnucap finds libgnucap.so.
2230 (substitute* (list "apps/configure" "lib/configure"
2231 "main/configure" "modelgen/configure")
2233 (string-append "LDFLAGS = -Wl,-rpath=" out "/lib")))
2234 ;; gnucap uses a hand-written configure script that expects the
2235 ;; --prefix argument to be the first argument passed to it.
2236 (invoke "./configure" (string-append "--prefix=" out)))))
2238 (lambda* (#:key outputs #:allow-other-keys)
2239 (let ((out (assoc-ref outputs "out"))
2240 (libpath "../lib/O:../apps/O"))
2241 (with-directory-excursion "tests"
2242 ;; Make test return non-zero exit code when a test fails.
2244 (("/bin/sh") "/bin/sh -e")
2245 (("\\|\\| echo \"\\*\\*\\*\\* \\$ii fails \\*\\*\\*\\*\"") ""))
2246 ;; Fix expected plugin search path for test c_attach.1.gc
2247 (substitute* "==out/c_attach.1.gc.out"
2248 (("/usr/local/lib/gnucap")
2249 (string-append libpath ":" out "/lib/gnucap")))
2250 ;; Set library path so that gnucap can find libgnucap.so
2251 ;; while running the tests.
2252 (setenv "LD_LIBRARY_PATH" libpath)
2253 (invoke "./test" "../main/O/gnucap" "" "test-output" "==out"))))))))
2254 (home-page "https://www.gnu.org/software/gnucap/")
2255 (synopsis "Mixed analog and digital circuit simulator")
2256 (description "GNUcap is a circuit analysis package. It offers a general
2257 purpose circuit simulator and can perform DC and transient analyses, fourier
2258 analysis and AC analysis. The engine is designed to do true mixed-mode
2260 (license license:gpl3+)))
2262 (define-public cutter
2270 (url "https://github.com/radareorg/cutter")
2271 (commit (string-append "v" version))))
2272 (file-name (git-file-name name version))
2274 (base32 "0qj8jyij02nif4jpirl09ygwnv8a9zi3vkb5sf5s8mg7qwlpnvyk"))))
2275 (build-system gnu-build-system)
2278 (modify-phases %standard-phases
2280 (lambda* (#:key inputs outputs #:allow-other-keys)
2281 (let ((out (assoc-ref outputs "out"))
2282 (radare2 (assoc-ref inputs "radare2")))
2283 ;; Fix pkg-config detection ./src/lib_radare2.pri:PREFIX=/usr/lib
2284 ;; override `qmake PREFIX=`.
2285 (substitute* "./src/lib_radare2.pri"
2286 (("PREFIX") "R2PREFIX")
2287 (("R2PREFIX=/usr") (string-append "R2PREFIX=" radare2)))
2289 (string-append "PREFIX=" out)
2290 "./src/Cutter.pro")))))))
2292 `(("pkg-config" ,pkg-config)))
2294 `(("qtbase" ,qtbase)
2296 ("openssl" ,openssl)
2297 ("radare2" ,radare2)))
2298 (home-page "https://github.com/radareorg/cutter")
2299 (synopsis "GUI for radare2 reverse engineering framework")
2300 (description "Cutter is a GUI for radare2 reverse engineering framework.
2301 Its goal is making an advanced andcustomizable reverse-engineering platform
2302 while keeping the user experience at mind. Cutter is created by reverse
2303 engineers for reverse engineers.")
2304 (license (list license:cc-by-sa3.0 ;the "Iconic" icon set
2305 license:gpl3+)))) ;everything else
2307 (define-public lib3mf
2314 (uri (git-reference (url "https://github.com/3MFConsortium/lib3mf")
2315 (commit (string-append "v" version))))
2316 (file-name (git-file-name name version))
2319 "11wpk6n9ga2p57h1dcrp37w77mii0r7r6mlrgmykf7rvii1rzgqd"))))
2320 (build-system cmake-build-system)
2322 `(("googletest-source" ,(package-source googletest))))
2324 `(("libuuid" ,util-linux "lib")))
2327 (modify-phases %standard-phases
2328 (add-after 'unpack 'unpack-googletest
2329 (lambda* (#:key inputs #:allow-other-keys)
2330 (copy-recursively (assoc-ref inputs "googletest-source")
2331 "UnitTests/googletest")
2333 (synopsis "Implementation of the 3D Manufacturing Format (3MF) file standard")
2335 "Lib3MF is a C++ implementation of the 3D Manufacturing Format (3MF) file
2336 standard. It offers a way to integrate 3MF reading and writing capabilities, as
2337 well as conversion and validation tools for input and output data. The
2338 specification can be downloaded at @url{http://3mf.io/specification/}.")
2339 (home-page "https://3mf.io/")
2340 (license license:bsd-2)))
2342 (define-public openscad
2349 (uri (string-append "https://files.openscad.org/openscad-" version
2353 "0nbgk5q5pgnw53la0kccdcpz2f4xf6d6076rkn0q08z57hkc85ha"))
2354 (patches (search-patches
2355 "openscad-parser-boost-1.72.patch"))))
2356 (build-system cmake-build-system)
2360 ("double-conversion" ,double-conversion)
2362 ("fontconfig" ,fontconfig)
2365 ("harfbuzz" ,harfbuzz)
2367 ("libxml2" ,libxml2)
2370 ("opencsg" ,opencsg)
2371 ("qscintilla" ,qscintilla)
2373 ("qtmultimedia" ,qtmultimedia)))
2377 ("gettext" ,gettext-minimal)
2378 ("pkg-config" ,pkg-config)
2380 ;; the following are only needed for tests
2381 ("imagemagick" ,imagemagick)
2384 ("xvfb" ,xorg-server-for-tests)))
2387 (modify-phases %standard-phases
2389 (lambda* (#:key outputs #:allow-other-keys)
2391 (string-append "PREFIX=" (assoc-ref outputs "out")))
2395 (with-directory-excursion "tests"
2396 (invoke "cmake" ".")
2399 ;; strip python test files since lib dir ends up in out/share
2400 (for-each delete-file
2401 (find-files "libraries/MCAD" ".*\\.py"))
2403 (synopsis "Script-based 3D modeling application")
2405 "OpenSCAD is a 3D Computer-aided Design (CAD) application. Unlike an
2406 interactive modeler, OpenSCAD generates 3D models from a script, giving you
2407 full programmatic control over your models.")
2408 (home-page "https://www.openscad.org/")
2409 (license license:gpl2+)))
2411 (define-public freecad
2419 (url "https://github.com/FreeCAD/FreeCAD")
2421 (modules '((guix build utils)))
2424 ;; Fix build with Python 3.8, see
2425 ;; <https://tracker.freecadweb.org/view.php?id=4143>.
2426 (substitute* "src/Base/swigpyrun.inl"
2427 (("PyObject \\*modules = interp->modules;")
2428 "PyObject *modules = PyEval_GetBuiltins();"))
2430 (file-name (git-file-name name version))
2433 "170hk1kgrvsddrwykp24wyj0cha78zzmzbf50gn98x7ngqqs395s"))))
2434 (build-system qt-build-system)
2436 `(("doxygen" ,doxygen)
2437 ("graphviz" ,graphviz)
2438 ("qttools" ,qttools)
2439 ("pkg-config" ,pkg-config)
2445 ("freetype" ,freetype)
2448 ("libarea" ,libarea)
2449 ("libmedfile" ,libmedfile)
2450 ("libspnav" ,libspnav)
2453 ("openmpi" ,openmpi)
2454 ("opencascade-occt" ,opencascade-occt)
2455 ("python-matplotlib" ,python-matplotlib)
2456 ("python-pyside-2" ,python-pyside-2)
2457 ("python-pyside-2-tools" ,python-pyside-2-tools)
2458 ("python-shiboken-2" ,python-shiboken-2)
2459 ("python-wrapper" ,python-wrapper)
2462 ("qtx11extras" ,qtx11extras)
2463 ("qtxmlpatterns" ,qtxmlpatterns)
2464 ;; qtwebkit is optional. We remove it currently, because it takes
2465 ;; much time to compile and substitutes are often unavailable
2466 ;;("qtwebkit" ,qtwebkit)
2469 ("xerces-c" ,xerces-c)
2476 (string-append "-DCMAKE_INSTALL_LIBDIR="
2477 (assoc-ref %outputs "out") "/lib"))
2479 (modify-phases %standard-phases
2480 (add-before 'configure 'restore-pythonpath
2482 (substitute* "src/Main/MainGui.cpp"
2483 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
2485 (add-after 'install 'wrap-pythonpath
2486 (lambda* (#:key outputs #:allow-other-keys)
2487 (let ((out (assoc-ref outputs "out")))
2488 (wrap-program (string-append out "/bin/FreeCAD")
2490 'prefix (list (getenv "PYTHONPATH")))))
2492 (home-page "https://www.freecadweb.org/")
2493 (synopsis "Your Own 3D Parametric Modeler")
2495 "FreeCAD is a general purpose feature-based, parametric 3D modeler for
2496 CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
2497 product design but also fits a wider range of uses in engineering, such as
2498 architecture or other engineering specialties. It is 100% Open Source (LGPL2+
2499 license) and extremely modular, allowing for very advanced extension and
2508 (define-public libmedfile
2516 "https://files.salome-platform.org/Salome/other/med-"
2520 "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
2521 (build-system cmake-build-system)
2522 (inputs `(("hdf5" ,hdf5-1.10)))
2525 (modify-phases %standard-phases
2526 (add-after 'install 'remove-test-output
2527 (lambda* (#:key outputs #:allow-other-keys)
2528 (let ((out (assoc-ref outputs "out")))
2529 (delete-file-recursively
2530 (string-append out "/bin/testc"))
2532 (home-page "https://www.salome-platform.org")
2533 (synopsis "Library to read and write MED files")
2535 "The purpose of the MED module is to provide a standard for storing and
2536 recovering computer data associated to numerical meshes and fields, and to
2537 facilitate the exchange between codes and solvers.
2539 The persistent data storage is based upon HDF format (like CGNS, a standard
2540 developed by Boeing and NASA in the area of Computational Fluid Dynamic).
2542 MED also provides structures to hold data on meshes and fields. These
2543 structures are exchanged between solvers, hide the communication level (CORBA
2544 or MPI), and offer persistence (read/write in .med files).
2546 The main benefit of a common exchange format is reduced complexity of code
2547 coupling. It also allows sharing such high level functionalities as
2548 computation of nodal connectivity of sub-elements (faces and edges),
2549 arithmetic operations on fields, entity location functionalities, and
2550 interpolation toolkit.")
2551 (license license:gpl3+)))
2553 (define-public libarea
2554 (let ((revision "1")
2555 (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
2558 (version (git-version "0" revision commit))
2562 (uri (git-reference (url "https://github.com/Heeks/libarea")
2564 (file-name (git-file-name name version))
2566 (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
2567 (build-system gnu-build-system)
2568 (inputs `(("boost" ,boost)
2569 ("python-wrapper" ,python-wrapper)))
2571 `(("cmake" ,cmake-minimal)))
2575 (modify-phases %standard-phases
2576 (add-after 'configure 'cmake-configure
2577 (lambda* (#:key inputs outputs #:allow-other-keys)
2578 (let ((out (assoc-ref outputs "out"))
2579 (cmake (assoc-ref inputs "cmake")))
2582 (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
2583 (delete 'configure))))
2584 (home-page "https://github.com/Heeks/libarea")
2586 "Library and python module for pocketing and profiling operations")
2588 "Area is a CAM-related software for pocketing operation.
2590 This project provides library and associated python-module to compute pocket
2596 (define-public libspnav
2603 (url "https://github.com/FreeSpacenav/libspnav")
2604 (commit (string-append "libspnav-" version))))
2607 "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba"))
2608 (file-name (git-file-name name version))))
2609 (build-system gnu-build-system)
2611 `(("libx11" ,libx11)))
2612 (arguments `(#:tests? #f))
2613 (home-page "http://spacenav.sourceforge.net/")
2615 "Library for communicating with spacenavd or 3dxsrv")
2617 "The libspnav library is provided as a replacement of the magellan
2618 library. It provides a cleaner, and more orthogonal interface. libspnav
2619 supports both the original X11 protocol for communicating with the driver, and
2620 the new alternative non-X protocol. Programs that choose to use the X11
2621 protocol, are automatically compatible with either the free spacenavd driver
2622 or the official 3dxserv, as if they were using the magellan SDK.
2624 Also, libspnav provides a magellan API wrapper on top of the new API. So, any
2625 applications that were using the magellan library, can switch to libspnav
2626 without any changes. And programmers that are familiar with the magellan API
2627 can continue using it with a free library without the restrictions of the
2629 (license license:bsd-3)))
2631 (define-public openctm
2632 (let ((revision 603))
2633 ;; Previous versions don't compile, they need to link libGL and libGLU.
2634 ;; Fixed in this revision.
2637 (version (string-append "1.0.3." (number->string revision)))
2642 (url "https://svn.code.sf.net/p/openctm/code/trunk")
2643 (revision revision)))
2644 (file-name (string-append name "-" version "-checkout"))
2646 (base32 "01wb70m48xh5gwhv60a5brv4sxl0i0rh038w32cgnlxn5x86s9f1"))))
2647 (build-system gnu-build-system)
2649 `(("pkg-config" ,pkg-config)))
2656 `(#:tests? #f ;no tests
2658 (modify-phases %standard-phases
2660 (lambda* (#:key outputs #:allow-other-keys)
2661 (rename-file "Makefile.linux" "Makefile")
2662 (let ((out (assoc-ref outputs "out")))
2663 ;; Create output directories.
2664 (mkdir-p (string-append out "/lib"))
2665 (mkdir-p (string-append out "/include"))
2666 (mkdir-p (string-append out "/bin"))
2668 (substitute* "tools/Makefile.linux"
2670 (string-append "-rpath," out "/lib/"))
2673 ;; Set right output.
2674 (substitute* "Makefile"
2676 (string-append out "/lib"))
2680 (synopsis "3D triangle mesh format and related tools and libraries")
2681 (description "OpenCTM is a file format, a software library and a tool set
2682 for compression of 3D triangle meshes. The geometry is compressed to a
2683 fraction of comparable file formats (3DS, STL, COLLADA...), and the format is
2684 accessible through a simple API")
2685 (license license:zlib)
2686 (home-page "http://openctm.sourceforge.net/"))))
2688 (define-public lib3ds
2696 "https://storage.googleapis.com/google-code-archive-downloads"
2697 "/v2/code.google.com/lib3ds/lib3ds-" version ".zip"))
2699 (base32 "1qr9arfdkjf7q11xhvxwzmhxqz3nhcjkyb8zzfjpz9jm54q0rc7m"))))
2700 (build-system gnu-build-system)
2702 `(("unzip" ,unzip)))
2703 (home-page "https://code.google.com/archive/p/lib3ds")
2704 (synopsis "3DS format file toolkit")
2705 (description "Lib3ds is a toolkit for handling the 3DS format for 3D
2706 model files. Its main goal is to simplify the creation of 3DS import and
2708 (license license:lgpl2.1+)))
2710 (define-public meshlab
2717 (url "https://github.com/cnr-isti-vclab/meshlab")
2718 (commit (string-append "Meshlab-" version))
2720 (file-name (git-file-name name version))
2722 (base32 "1cgx24wxh2ah5pff51rcrk6x8qcdjpkxcdak7s4cfzmxvjlshydd"))))
2723 (build-system cmake-build-system)
2725 `(("qtbase" ,qtbase)
2726 ("qtscript" ,qtscript)
2727 ("qtxmlpatterns" ,qtxmlpatterns)
2731 ("muparser" ,muparser)
2734 ("libfreenect" ,libfreenect)
2736 ("openctm" ,openctm)
2737 ;; FIXME: Compilation fails with system qhull:
2738 ;; https://github.com/cnr-isti-vclab/meshlab/issues/678
2742 `(#:tests? #f ; Has no tests
2744 (modify-phases %standard-phases
2745 (add-after 'unpack 'go-to-source-dir
2746 (lambda _ (chdir "src") #t))
2747 (add-after 'install 'move-files
2748 (lambda* (#:key outputs #:allow-other-keys)
2749 (let ((lib (string-append (assoc-ref outputs "out")
2752 (string-append lib "/meshlab/libmeshlab-common.so")
2753 (string-append lib "/libmeshlab-common.so"))
2755 (synopsis "3D triangular mesh processing and editing software")
2756 (home-page "https://www.meshlab.net/")
2757 (description "MeshLab is a system for the processing and
2758 editing of unstructured large 3D triangular meshes. It is aimed to help the
2759 processing of the typical not-so-small unstructured models arising in 3D
2760 scanning, providing a set of tools for editing, cleaning, healing, inspecting,
2761 rendering and converting this kind of meshes. These tools include MeshLab
2762 proper, a versatile program with a graphical user interface, and meshlabserver,
2763 a program that can perform mesh processing tasks in batch mode, without a
2765 (license license:gpl3+)))
2768 ;; Upstream has yet to tag any releases.
2769 (let ((commit "d33317a46e3b7c48130a471a48cbfea1abab70d8")
2773 (version (git-version "0.0.0" revision commit))
2778 (url "git://git.savannah.gnu.org/poke.git")
2782 (base32 "1dd0r1x123bqi78lrsk58rvg9c9wka0kywdyzn7g3i4hkh54xb7d"))
2783 (file-name (git-file-name name version))))
2784 (build-system gnu-build-system)
2785 ;; The GUI, which we elide, requires tcl and tk.
2786 (native-inputs `(("autoconf" ,autoconf)
2787 ("automake" ,automake)
2788 ;; Requires bison 3.6+ but we currently only have 3.5.
2789 ;; Bison 3.6 will be available in the next core update.
2790 ("bison-3.6" ,bison-3.6)
2792 ("dejagnu" ,dejagnu)
2794 ("gettext" ,gettext-minimal)
2795 ("help2man" ,help2man)
2796 ("libtool" ,libtool)
2798 ("pkg-config" ,pkg-config)
2799 ("python-2" ,python-2)
2800 ("python-3" ,python-3)
2801 ("texinfo" ,texinfo)))
2802 ;; FIXME: Enable NBD support by adding `libnbd' (currently unpackaged).
2803 ;; FIXME: A "hyperlinks-capable" `libtexststyle' needed for the hserver.
2804 (inputs `(("json-c" ,json-c)
2806 ("readline" ,readline)))
2808 ;; To build the GUI, add the `--enable-gui' configure flag.
2809 ;; To enable the "hyperlink server", add the `--enable-hserver' flag.
2810 `(#:configure-flags '("--enable-mi")
2811 #:phases (modify-phases %standard-phases
2812 ;; This is a non-trivial bootstrap that needs many of the
2813 ;; native-inputs and thus must run after `patch-shebangs'.
2815 (add-after 'patch-source-shebangs 'bootstrap
2817 (invoke "./bootstrap" "--no-git"
2818 "--no-bootstrap-sync"
2819 "--gnulib-srcdir=gnulib")
2821 (home-page "http://jemarch.net/poke.html")
2822 (synopsis "Interactive, extensible editor for binary data")
2823 (description "GNU poke is an interactive, extensible editor for binary
2824 data. Not limited to editing basic entities such as bits and bytes, it
2825 provides a full-fledged procedural, interactive programming language designed
2826 to describe data structures and to operate on them.")
2827 (license license:gpl3+))))