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, 2021 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2016, 2017, 2018, 2019, 2021 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–2021 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, 2020 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,2021 Vincent Legoll <vincent.legoll@gmail.com>
19 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2020, 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
21 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
22 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
23 ;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
24 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
25 ;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com>
27 ;;; This file is part of GNU Guix.
29 ;;; GNU Guix is free software; you can redistribute it and/or modify it
30 ;;; under the terms of the GNU General Public License as published by
31 ;;; the Free Software Foundation; either version 3 of the License, or (at
32 ;;; your option) any later version.
34 ;;; GNU Guix is distributed in the hope that it will be useful, but
35 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 ;;; GNU General Public License for more details.
39 ;;; You should have received a copy of the GNU General Public License
40 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42 (define-module (gnu packages engineering)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix gexp)
46 #:use-module (guix git-download)
47 #:use-module (guix svn-download)
48 #:use-module (guix monads)
49 #:use-module (guix store)
50 #:use-module (guix utils)
51 #:use-module ((srfi srfi-1) #:hide (zip))
52 #:use-module ((guix licenses) #:prefix license:)
53 #:use-module (guix build-system ant)
54 #:use-module (guix build-system cmake)
55 #:use-module (guix build-system emacs)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system python)
58 #:use-module (guix build-system qt)
59 #:use-module (gnu packages)
60 #:use-module (gnu packages algebra)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages base)
63 #:use-module (gnu packages bdw-gc)
64 #:use-module (gnu packages bison)
65 #:use-module (gnu packages boost)
66 #:use-module (gnu packages check)
67 #:use-module (gnu packages cmake)
68 #:use-module (gnu packages commencement)
69 #:use-module (gnu packages compression)
70 #:use-module (gnu packages curl)
71 #:use-module (gnu packages dejagnu)
72 #:use-module (gnu packages digest)
73 #:use-module (gnu packages docbook)
74 #:use-module (gnu packages documentation)
75 #:use-module (gnu packages flex)
76 #:use-module (gnu packages fontutils)
77 #:use-module (gnu packages fpga)
78 #:use-module (gnu packages freedesktop)
79 #:use-module (gnu packages gcc)
80 #:use-module (gnu packages gd)
81 #:use-module (gnu packages geo)
82 #:use-module (gnu packages gettext)
83 #:use-module (gnu packages ghostscript)
84 #:use-module (gnu packages gl)
85 #:use-module (gnu packages glib)
86 #:use-module (gnu packages gnome)
87 #:use-module (gnu packages gperf)
88 #:use-module (gnu packages graphics)
89 #:use-module (gnu packages graphviz)
90 #:use-module (gnu packages groff)
91 #:use-module (gnu packages gtk)
92 #:use-module (gnu packages guile)
93 #:use-module (gnu packages image)
94 #:use-module (gnu packages image-processing)
95 #:use-module (gnu packages imagemagick)
96 #:use-module (gnu packages libevent)
97 #:use-module (gnu packages linux) ;FIXME: for pcb
98 #:use-module (gnu packages lisp)
99 #:use-module (gnu packages m4)
100 #:use-module (gnu packages maths)
101 #:use-module (gnu packages man)
102 #:use-module (gnu packages multiprecision)
103 #:use-module (gnu packages mpi)
104 #:use-module (gnu packages ncurses)
105 #:use-module (gnu packages parallel)
106 #:use-module (gnu packages pcre)
107 #:use-module (gnu packages perl)
108 #:use-module (gnu packages pkg-config)
109 #:use-module (gnu packages pretty-print)
110 #:use-module (gnu packages python)
111 #:use-module (gnu packages python-crypto)
112 #:use-module (gnu packages python-xyz)
113 #:use-module (gnu packages qt)
114 #:use-module (gnu packages readline)
115 #:use-module (gnu packages serialization)
116 #:use-module (gnu packages sqlite)
117 #:use-module (gnu packages swig)
118 #:use-module (gnu packages tbb)
119 #:use-module (gnu packages tcl)
120 #:use-module (gnu packages texinfo)
121 #:use-module (gnu packages tls)
122 #:use-module (gnu packages tex)
123 #:use-module (gnu packages version-control)
124 #:use-module (gnu packages web)
125 #:use-module (gnu packages wxwidgets)
126 #:use-module (gnu packages xml)
127 #:use-module (gnu packages xiph)
128 #:use-module (gnu packages openkinect)
129 #:use-module (gnu packages xorg))
131 (define-public librecad
134 (version "2.2.0-rc2")
138 "https://github.com/LibreCAD/LibreCAD/archive/"
140 (file-name (string-append name "-" version ".tar.gz"))
143 "0a7fzhxkkn2s3hkgqrw3s3wyspzfla3c5lgbsjyqzvlnrp3anxnm"))))
144 (build-system gnu-build-system)
147 (modify-phases %standard-phases
148 ;; Without this patch boost complains that "make_array" is not a
149 ;; member of "boost::serialization".
150 (add-after 'unpack 'patch-boost-error
152 (substitute* "librecad/src/lib/math/lc_quadratic.h"
153 (("#include \"rs_vector.h\"" line)
155 "\n#include <boost/serialization/array_wrapper.hpp>")))
156 (substitute* "librecad/src/lib/math/rs_math.cpp"
157 (("#include <boost/numeric/ublas/matrix.hpp>" line)
158 (string-append "#include <boost/serialization/array_wrapper.hpp>\n"
161 ;; Fix build against Qt 5.11.
162 (add-after 'unpack 'add-missing-headers
164 (substitute* "librecad/src/ui/generic/widgetcreator.cpp"
165 (("#include <QPushButton>") "#include <QPushButton>
166 #include <QActionGroup>"))
168 (add-after 'unpack 'patch-paths
169 (lambda* (#:key outputs #:allow-other-keys)
170 (let ((out (assoc-ref outputs "out")))
171 (substitute* "librecad/src/lib/engine/rs_system.cpp"
172 (("/usr/share") (string-append out "/share"))))))
174 (lambda* (#:key inputs #:allow-other-keys)
175 (system* "qmake" (string-append "BOOST_DIR="
176 (assoc-ref inputs "boost")))))
178 (lambda* (#:key outputs #:allow-other-keys)
179 (let* ((out (assoc-ref outputs "out"))
180 (bin (string-append out "/bin"))
181 (share (string-append out "/share/librecad")))
183 (install-file "unix/librecad" bin)
185 (copy-recursively "unix/resources" share))
187 ;; Ensure that icons are found at runtime
188 (add-after 'install 'wrap-executable
189 (lambda* (#:key inputs outputs #:allow-other-keys)
190 (let* ((out (assoc-ref outputs "out"))
191 (qt '("qtbase" "qtsvg")))
192 (wrap-program (string-append out "/bin/librecad")
193 `("QT_PLUGIN_PATH" ":" prefix
194 ,(map (lambda (label)
195 (string-append (assoc-ref inputs label)
196 "/lib/qt5/plugins/"))
201 ("muparser" ,muparser)
202 ("freetype" ,freetype)
206 `(("pkg-config" ,pkg-config)
208 (home-page "https://librecad.org/")
209 (synopsis "Computer-aided design (CAD) application")
211 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
213 (license license:gpl2)))
215 (define-public geda-gaf
222 "http://ftp.geda-project.org/geda-gaf/stable/v"
223 (version-major+minor version) "/"
224 version "/geda-gaf-" version ".tar.gz"))
227 "06ivgarvwbzjz2wigxzzkm8iszldi2p6x3a6jnlczjyrz4csddsy"))))
228 (build-system gnu-build-system)
231 (modify-phases %standard-phases
232 ;; tests require a writable HOME
233 (add-before 'check 'set-home
235 (setenv "HOME" (getenv "TMPDIR"))
237 (add-after 'unpack 'disable-failing-tests
239 (substitute* "xorn/tests/Makefile.in"
241 ;; This test returns its correct result in an unexpected order.
242 (substitute* "libgeda/scheme/unit-tests/t0402-config.scm"
243 (("\\(begin-config-test 'config-keys" m)
244 (string-append "#;" m)))
247 (let ((pcb (assoc-ref %build-inputs "pcb")))
248 (list (string-append "--with-pcb-datadir=" pcb "/share")
249 (string-append "--with-pcb-lib-path="
250 pcb "/share/pcb/pcblib-newlib:"
251 pcb "/share/pcb/newlib")))))
257 ("shared-mime-info" ,shared-mime-info)
260 ("python" ,python-2))) ; for xorn
262 `(("pkg-config" ,pkg-config)
263 ("desktop-file-utils" ,desktop-file-utils)
264 ("perl" ,perl))) ; for tests
265 (home-page "http://geda-project.org/")
266 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
268 "Gaf stands for “gschem and friends”. It is a subset of the entire tool
269 suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
270 which currently includes: gschem, a schematic capture program; gnetlist, a
271 netlist generation program; gsymcheck, a syntax checker for schematic symbols;
272 gattrib, a spreadsheet programme that manipulates the properties of symbols of
273 a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
274 tool to forward annotation from your schematic to layout using PCB; some minor
276 (license license:gpl2+)))
278 (define-public lepton-eda
279 ;; This is a fork of gEDA/gaf started in late 2016. One of its goal is to
280 ;; keep and to extend Guile support.
284 (version "1.9.13-20201211")
285 (home-page "https://github.com/lepton-eda/lepton-eda")
288 (uri (git-reference (url home-page) (commit version)))
291 "0xfx6d0pyfrxr1c0nm4pbmb716hng78rgizaa6vsas9347n4kk1n"))
292 (file-name (git-file-name name version))))
294 `(("autoconf" ,autoconf)
295 ("automake" ,automake)
296 ("desktop-file-utils" ,desktop-file-utils)
298 ("gettext" ,gettext-minimal)
302 ,@(package-native-inputs geda-gaf)))
306 ("gtksheet" ,gtksheet)
308 ("shared-mime-info" ,shared-mime-info)
313 (let ((pcb (assoc-ref %build-inputs "pcb")))
314 ;; When running "make", the POT files are built with the build time as
315 ;; their "POT-Creation-Date". Later on, "make" notices that .pot
316 ;; files were updated and goes on to run "msgmerge"; as a result, the
317 ;; non-deterministic POT-Creation-Date finds its way into .po files,
318 ;; and then in .gmo files. To avoid that, simply make sure 'msgmerge'
319 ;; never runs. See <https://bugs.debian.org/792687>.
320 (list "ac_cv_path_MSGMERGE=true"
322 (string-append "--with-pcb-datadir=" pcb "/share")
323 (string-append "--with-pcb-lib-path="
324 pcb "/share/pcb/pcblib-newlib:"
325 pcb "/share/pcb/newlib")))
327 (modify-phases %standard-phases
328 (add-before 'build 'fix-dynamic-link
329 (lambda* (#:key inputs outputs #:allow-other-keys)
330 (substitute* "libleptongui/scheme/schematic/ffi.scm.in"
332 (string-append (assoc-ref outputs "out")
333 "/lib/libleptongui.so")))
334 (substitute* '("libleptongui/scheme/schematic/ffi/gtk.scm.in"
335 "libleptonattrib/lepton-attrib.scm")
337 (string-append (assoc-ref inputs "gtk")
338 "/lib/libgtk-3.so")))
339 (substitute* "liblepton/scheme/lepton/ffi.scm.in"
341 (string-append (assoc-ref outputs "out")
342 "/lib/liblepton.so")))
343 (substitute* "libleptonattrib/lepton-attrib.scm"
344 (("@LIBLEPTONATTRIB@")
345 (string-append (assoc-ref outputs "out")
346 "/lib/libleptonattrib.so")))
347 (substitute* "liblepton/scheme/lepton/log.scm.in"
349 (string-append (assoc-ref inputs "glib")
350 "/lib/libglib-2.0.so")))
352 ;; For finding libraries when running tests before installation.
353 (setenv "LIBLEPTONGUI"
354 (string-append (getcwd)
355 "/libleptongui/src/.libs/libleptongui.so"))
357 (string-append (getcwd)
358 "/libleptongui/src/.libs/liblepton.so"))
359 (setenv "LD_LIBRARY_PATH"
360 (string-append (getcwd) "/libleptonattrib/src/.libs/:"
361 (getenv "LIBRARY_PATH")))
363 (add-before 'bootstrap 'prepare
365 ;; Some of the scripts there are invoked by autogen.sh.
366 (for-each patch-shebang (find-files "build-tools"))
368 ;; Make sure 'msgmerge' can modify the PO files.
369 (for-each (lambda (po)
371 (find-files "." "\\.po$"))
373 ;; This would normally be created by invoking 'git', but it
374 ;; doesn't work here.
375 (call-with-output-file "version.h"
377 (format port "#define PACKAGE_DATE_VERSION \"~a\"~%"
378 ,(string-drop version
379 (+ 1 (string-index version #\-))))
380 (format port "#define PACKAGE_DOTTED_VERSION \"~a\"~%"
381 ,(string-take version
382 (string-index version #\-)))
383 (format port "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%")))
385 (add-after 'install 'compile-scheme-files
386 (lambda* (#:key outputs #:allow-other-keys)
387 (unsetenv "LIBLEPTONGUI")
388 (unsetenv "LIBLEPTON")
389 (unsetenv "LD_LIBRARY_PATH")
390 (invoke "make" "precompile")
393 "Lepton EDA ia an @dfn{electronic design automation} (EDA) tool set
394 forked from gEDA/gaf in late 2016. EDA tools are used for electrical circuit
395 design, schematic capture, simulation, prototyping, and production. Lepton
396 EDA includes tools for schematic capture, attribute management, bill of
397 materials (BOM) generation, netlisting into over 20 netlist formats, analog
398 and digital simulation, and printed circuit board (PCB) layout, and many other
407 (uri (string-append "mirror://sourceforge/pcb/pcb/pcb-" version
408 "/pcb-" version ".tar.gz"))
411 "1a7rilp75faidny0r4fdwdxkflyrqp6svxv9lbg7h868293962iz"))))
412 (build-system gnu-build-system)
415 (modify-phases %standard-phases
416 (add-after 'unpack 'use-wish8.6
418 (substitute* "configure"
419 (("wish85") "wish8.6"))
421 ;; It checks for "xhost", which we don't have. This shouldn't
422 ;; matter, because the test is supposed to be skipped, but it causes
423 ;; "run_tests.sh" (and thus the "check" phase) to fail.
424 (add-after 'unpack 'fix-check-for-display
426 (substitute* "tests/run_tests.sh"
427 (("have_display=no") "have_display=yes"))
429 (add-after 'install 'wrap
430 (lambda* (#:key inputs outputs #:allow-other-keys)
431 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
432 ;; fix of the mesa package we wrap the pcb executable such that
433 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
434 (let* ((out (assoc-ref outputs "out"))
435 (path (string-append (assoc-ref inputs "udev") "/lib")))
436 (wrap-program (string-append out "/bin/pcb")
437 `("LD_LIBRARY_PATH" ":" prefix (,path))))
439 (add-before 'check 'pre-check
442 (setenv "DISPLAY" ":1")
447 ("udev" ,eudev) ;FIXME: required by mesa
451 ("gtkglext" ,gtkglext)
452 ("shared-mime-info" ,shared-mime-info)
455 `(("pkg-config" ,pkg-config)
456 ("intltool" ,intltool)
458 ("desktop-file-utils" ,desktop-file-utils)
461 ("imagemagick" ,imagemagick)
463 ("ghostscript" ,ghostscript)
464 ("xvfb" ,xorg-server-for-tests)))
465 (home-page "http://pcb.geda-project.org/")
466 (synopsis "Design printed circuit board layouts")
468 "GNU PCB is an interactive tool for editing printed circuit board
469 layouts. It features a rats-nest implementation, schematic/netlist import,
470 and design rule checking. It also includes an autorouter and a trace
471 optimizer; and it can produce photorealistic and design review images.")
472 (license license:gpl2+)))
474 (define-public pcb-rnd
475 (package (inherit pcb)
480 (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/"
481 "pcb-rnd-" version ".tar.gz"))
484 "06ylc2rd4yvzp3krk62q9dbi13h0yq1x257fbjkh10vfjn0ga5c2"))))
486 `(#:tests? #f ; no check target
488 (modify-phases %standard-phases
489 (add-after 'unpack 'cc-is-gcc
490 (lambda _ (setenv "CC" "gcc") #t))
492 ;; The configure script doesn't tolerate most of our configure flags.
493 (lambda* (#:key outputs #:allow-other-keys)
494 (invoke "sh" "configure"
495 (string-append "--prefix="
496 (assoc-ref outputs "out"))))))))
497 (home-page "http://repo.hu/projects/pcb-rnd/")
498 (description "PCB RND is a fork of the GNU PCB circuit board editing tool
499 featuring various improvements and bug fixes.")))
501 (define-public fastcap
504 (version "2.0-18Sep92")
506 (method url-fetch/tarbomb)
507 (uri (string-append "http://www.rle.mit.edu/cpg/codes/"
508 name "-" version ".tgz"))
511 "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k"))
513 ;; Remove a non-free file.
515 (delete-file "doc/psfig.sty")
517 (patches (search-patches "fastcap-mulSetup.patch"
518 "fastcap-mulGlobal.patch"))))
519 (build-system gnu-build-system)
521 ;; FIXME: with texlive-tiny citation references are rendered as question
522 ;; marks. During the build warnings like these are printed:
523 ;; LaTeX Warning: Citation `nabors91' on page 2 undefined on input line 3.
524 `(("texlive" ,(texlive-union (list texlive-fonts-amsfonts)))
525 ("ghostscript" ,ghostscript)))
527 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
529 #:tests? #f ;; no tests-suite
530 #:modules ((srfi srfi-1)
531 ,@%gnu-build-system-modules)
533 (modify-phases %standard-phases
534 (add-after 'build 'make-doc
536 (invoke "make" "CC=gcc" "RM=rm" "SHELL=sh" "manual")))
537 (add-before 'make-doc 'fix-doc
539 (substitute* "doc/Makefile" (("/bin/rm") (which "rm")))
540 (substitute* (find-files "doc" "\\.tex")
541 (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}"
543 (string-append "\\includegraphics[scale=" scale "]{"
545 (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}"
547 (string-append "\\includegraphics[width=" width "]{"
549 (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}"
551 (string-append "\\includegraphics[height=" height "]{"
553 (("\\\\psfig\\{figure=([^,]*)\\}" all file)
554 (string-append "\\includegraphics{" file "}")))
555 (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex")
556 (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}"
558 (string-append "\\documentclass[" options "]{"
560 "\\usepackage{graphicx}\n"
561 "\\usepackage{robinspace}"))
562 (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all)
563 (string-append "%" all))
564 (("\\\\setstretch\\{.*\\}" all)
565 (string-append "%" all)))
568 (add-before 'install 'clean-bin
570 (delete-file (string-append (getcwd) "/bin/README"))
572 (add-before 'install 'make-pdf
574 (setenv "HOME" "/tmp") ; FIXME: for texlive font cache
575 (with-directory-excursion "doc"
577 (for-each (lambda (file)
578 (invoke "dvips" file "-o"))
579 (find-files "." "\\.dvi"))
580 (for-each (lambda (file)
581 (invoke "ps2pdf" file))
582 '("mtt.ps" "ug.ps" "tcad.ps"))
583 (invoke "make" "clean")))))
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 capacitance extraction program")
601 "Fastcap is a capacitance extraction program based on a
602 multipole-accelerated algorithm.")
603 (license (license:non-copyleft #f "See fastcap.c."))))
605 (define-public fasthenry
608 (version "3.0-12Nov96")
611 (file-name (string-append name "-" version ".tar.gz"))
613 "http://www.rle.mit.edu/cpg/codes/" name
614 "-" version ".tar.z"))
616 (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
617 (patches (search-patches "fasthenry-spAllocate.patch"
618 "fasthenry-spBuild.patch"
619 "fasthenry-spUtils.patch"
620 "fasthenry-spSolve.patch"
621 "fasthenry-spFactor.patch"))))
622 (build-system gnu-build-system)
624 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
626 #:tests? #f ;; no tests-suite
627 #:modules ((srfi srfi-1)
628 ,@%gnu-build-system-modules)
630 (modify-phases %standard-phases
633 (lambda* (#:key outputs #:allow-other-keys)
634 (let* ((out (assoc-ref outputs "out"))
635 (data (string-append out "/share"))
636 (bin (string-append out "/bin"))
637 (doc (string-append data "/doc/" ,name "-" ,version))
638 (examples (string-append doc "/examples")))
639 (with-directory-excursion "bin"
640 (for-each (lambda (f)
641 (install-file f bin))
642 (find-files "." ".*")))
643 (copy-recursively "doc" doc)
644 (copy-recursively "examples" examples)
646 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
647 (synopsis "Multipole-accelerated inductance analysis program")
649 "Fasthenry is an inductance extraction program based on a
650 multipole-accelerated algorithm.")
651 (license (license:non-copyleft #f "See induct.c."))))
653 (define-public fritzing
660 (url "https://github.com/fritzing/fritzing-app")
662 (file-name (git-file-name name version))
665 "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
666 (build-system gnu-build-system)
669 (modify-phases %standard-phases
671 (lambda* (#:key inputs outputs #:allow-other-keys)
672 (copy-recursively (assoc-ref inputs "fritzing-parts-db")
674 ;; Make compatible with libgit2 > 0.24
675 (substitute* "src/version/partschecker.cpp"
676 (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
677 "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
679 ;; Use system libgit2 and boost.
680 (substitute* "phoenix.pro"
681 (("^LIBGIT2INCLUDE =.*")
682 (string-append "LIBGIT2INCLUDE="
683 (assoc-ref inputs "libgit2") "/include\n"))
684 (("^ LIBGIT2LIB =.*")
685 (string-append " LIBGIT2LIB="
686 (assoc-ref inputs "libgit2") "/lib\n")))
687 ;; This file checks for old versions of Boost, insisting on
688 ;; having us download the boost sources and placing them in the
690 (substitute* "pri/utils.pri"
691 (("error\\(") "message("))
693 (let ((out (assoc-ref outputs "out")))
695 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib")
696 (string-append "PREFIX=" out)
700 ("qtserialport" ,qtserialport)
709 (url "https://github.com/fritzing/fritzing-parts")
711 (file-name (git-file-name "fritzing-parts" version))
714 "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
715 (home-page "https://fritzing.org")
716 (synopsis "Electronic circuit design")
718 "The Fritzing application is @dfn{Electronic Design Automation} (EDA)
719 software with a low entry barrier, suited for the needs of makers and
720 hobbyists. It offers a unique real-life \"breadboard\" view, and a parts
721 library with many commonly used high-level components. Fritzing makes it very
722 easy to communicate about circuits, as well as to turn them into PCB layouts
723 ready for production.")
724 ;; Documentation and parts are released under CC-BY-SA 3.0; source code is
725 ;; released under GPLv3+.
726 (license (list license:gpl3+ license:cc-by-sa3.0))))
734 (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-"
735 version "/gerbv-" version ".tar.gz"))
738 "1d2k43k7i4yvbpi4sw1263a8d0q98z2n7aqhmpinpkih8a681vn5"))))
739 (build-system gnu-build-system)
741 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
742 ("desktop-file-utils" ,desktop-file-utils)
743 ("pkg-config" ,pkg-config)))
747 (home-page "http://gerbv.geda-project.org/")
748 (synopsis "Gerber file viewer")
750 "Gerbv is a viewer for files in the Gerber format (RS-274X only), which
751 is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets
752 you load several files on top of each other, do measurements on the displayed
753 image, etc. Besides viewing Gerbers, you may also view Excellon drill files
754 as well as pick-place files.")
755 (license license:gpl2+)))
757 (define-public translate2geda
758 ;; There has been no formal release yet.
759 (let ((commit "4c19e7eefa338cea8f1ee999ea8b37f8d0698169")
762 (name "translate2geda")
763 (version (git-version "0" revision commit))
767 (url "https://github.com/erichVK5/translate2geda")
769 (file-name (git-file-name name version))
772 "1h062bbpw8nk0jamkya1k4lsgaia796jyviiz2gkdi6k1bxhwgpa"))))
773 (build-system ant-build-system)
775 `(#:tests? #f ; there are no tests
776 #:jar-name "translate2geda.jar"
778 #:main-class "translate2geda"
780 (modify-phases %standard-phases
781 (add-after 'install 'install-bin
782 (lambda* (#:key inputs outputs #:allow-other-keys)
783 (let* ((out (assoc-ref outputs "out"))
784 (bin (string-append out "/bin"))
785 (wrapper (string-append bin "/translate2geda")))
787 (with-output-to-file wrapper
789 (format #t "#!/bin/sh~%exec ~a -jar ~a/share/java/translate2geda.jar"
790 (which "java") out)))
791 (chmod wrapper #o555))
793 (home-page "https://github.com/erichVK5/translate2geda")
794 (synopsis "Utility for converting symbol and footprint formats to gEDA")
796 "This package provides a utility for converting Kicad (@file{.mod},
797 @file{.lib}), Eagle (@file{.lbr}), gerber (@file{.gbr}, etc..),
798 BXL (@file{.bxl}), IBIS (@file{.ibs}), symdef, LT-Spice (@file{.asc}),
799 QUCS (@file{.sch}), and BSDL (@file{.bsd}) symbols and footprints and EggBot
801 (license license:gpl2+))))
803 (define-public libfive
804 (let ((commit "8ca1b8685ef3fac7b64e66b10459b8421a3020c6")
808 (version (git-version "0" revision commit))
812 (url "https://github.com/libfive/libfive")
816 "1c762cd70iv2b9av0l9lq0py9138y98wk3dirhdmil7jncdhvq98"))
817 (file-name (git-file-name name version))))
818 (build-system cmake-build-system)
820 `(#:test-target "libfive-test"
822 (modify-phases %standard-phases
823 (add-after 'unpack 'remove-native-compilation
825 (substitute* "CMakeLists.txt" (("-march=native") ""))
828 `(("pkg-config" ,pkg-config)))
834 ("guile" ,guile-3.0)))
835 (home-page "https://libfive.com")
836 (synopsis "Tool for programmatic computer-aided design")
838 "Libfive is a tool for programmatic computer-aided design (CAD). In
839 libfive, solid models are defined as Scheme scripts, and there are no opaque
840 function calls into the geometry kernel: everything is visible to the user.
841 Even fundamental, primitive shapes are represented as code in the user-level
843 (license (list license:mpl2.0 ;library
844 license:gpl2+))))) ;Guile bindings and GUI
846 (define-public inspekt3d
847 (let ((commit "703f52ccbfedad2bf5240bf8183d1b573c9d54ef")
851 (version (git-version "0" revision commit))
855 (url "https://gitlab.com/kavalogic-inc/inspekt3d.git")
857 (file-name (git-file-name name version))
860 "0lan6930g5a9z4ack9jj0zdd0mb2s6q2xzpiwcjdc3pvl9b1nbw4"))
861 (modules '((guix build utils)))
864 ;; Allow builds with Guile 3.0.
865 (substitute* "configure.ac"
866 (("2\\.2") "3.0 2.2"))
868 (build-system gnu-build-system)
871 (modify-phases %standard-phases
872 (add-after 'unpack 'patch-libfive-guile-location
873 (lambda* (#:key inputs #:allow-other-keys)
874 (substitute* "inspekt3d/library.scm"
877 (assoc-ref inputs "libfive")
878 "/lib/libfive-guile")))
881 `(("autoconf" ,autoconf)
882 ("automake" ,automake)
883 ("pkg-config" ,pkg-config)))
886 ("guile" ,guile-3.0)))
888 `(("libfive" ,libfive)
889 ("guile-opengl" ,guile3.0-opengl)))
890 (home-page "https://gitlab.com/kavalogic-inc/inspekt3d/")
891 (synopsis "Lightweight 3D viewer for Libfive written in Guile Scheme")
893 "Inspekt3d is a lightweight 3D viewer for Libfive written in Guile Scheme.
894 The viewer can be used interactively with a REPL (for example Geiser in
896 (license license:gpl3+))))
906 (url "https://gitlab.com/kicad/code/kicad.git")
909 (base32 "1pa3z0h0679jmgxlzc833h6q85b5paxdp69kf2h93vkaryj58622"))
910 (file-name (git-file-name name version))))
911 (build-system cmake-build-system)
913 `(#:out-of-source? #t
914 #:tests? #f ; no tests
915 #:build-type "Release"
917 (list "-DKICAD_SCRIPTING_PYTHON3=ON"
918 "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON"
919 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE")
921 (modify-phases %standard-phases
922 (add-after 'install 'install-translations
923 (lambda* (#:key inputs outputs #:allow-other-keys)
924 (copy-recursively (assoc-ref inputs "kicad-i18n")
925 (assoc-ref outputs "out"))
927 (add-after 'install 'wrap-program
928 ;; Ensure correct Python at runtime.
929 (lambda* (#:key inputs outputs #:allow-other-keys)
930 (let* ((out (assoc-ref outputs "out"))
931 (python (assoc-ref inputs "python"))
932 (file (string-append out "/bin/kicad"))
936 ,(version-major+minor
937 (package-version python))
939 (getenv "PYTHONPATH"))))
941 `("PYTHONPATH" ":" prefix (,path))
943 (,(string-append python "/bin:")))))
946 (list (search-path-specification
947 (variable "KICAD") ; to find kicad-doc
949 (search-path-specification
950 (variable "KICAD_TEMPLATE_DIR")
951 (files '("share/kicad/template")))
952 (search-path-specification
953 (variable "KICAD_SYMBOL_DIR") ; symbol path
954 (files '("share/kicad/library")))
955 (search-path-specification
956 (variable "KISYSMOD") ; footprint path
957 (files '("share/kicad/modules")))
958 (search-path-specification
959 (variable "KISYS3DMOD") ; 3D model path
960 (files '("share/kicad/modules/packages3d")))))
963 ("desktop-file-utils" ,desktop-file-utils)
964 ("gettext" ,gettext-minimal)
965 ("kicad-i18n" ,kicad-i18n)
966 ("pkg-config" ,pkg-config)
974 ("hicolor-icon-theme" ,hicolor-icon-theme)
975 ("libngspice" ,libngspice)
978 ("opencascade-oce" ,opencascade-oce)
980 ("python" ,python-wrapper)
981 ("wxwidgets" ,wxwidgets)
982 ("wxpython" ,python-wxpython)))
983 (home-page "https://kicad-pcb.org/")
984 (synopsis "Electronics Design Automation Suite")
985 (description "Kicad is a program for the formation of printed circuit
986 boards and electrical circuits. The software has a number of programs that
987 perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing
988 electrical diagrams), gerbview (viewing Gerber files) and others.")
989 (license license:gpl3+)))
994 (version (package-version kicad))
998 (url "https://gitlab.com/kicad/code/kicad-i18n.git")
1000 (file-name (git-file-name name version))
1003 "0qryi8xjm23ka363zfl7bbga0v5c31fr3d4nyxp3m168vkv9zhha"))))
1004 (build-system cmake-build-system)
1007 (modify-phases %standard-phases
1011 `(("gettext" ,gettext-minimal)))
1012 (home-page (package-home-page kicad))
1013 (synopsis "KiCad GUI translations")
1014 (description "This package contains the po files that are used for the GUI
1015 translations for KiCad.")
1016 (license license:gpl3+)))
1018 (define-public kicad-i18l
1019 (deprecated-package "kicad-i18l" kicad-i18n))
1021 (define-public kicad-doc
1028 (url "https://gitlab.com/kicad/services/kicad-doc.git")
1030 (file-name (git-file-name name version))
1033 "03kvss8a0xrjnfvkwymm0vfd7rn9ix7i926xdzz9jg9iycrjfj3g"))))
1034 (build-system cmake-build-system)
1036 `(#:configure-flags (list "-DBUILD_FORMATS=html")
1038 (modify-phases %standard-phases
1040 (add-before 'install 'set-perl-env
1041 (lambda* (#:key inputs #:allow-other-keys)
1043 (string-append (assoc-ref inputs "perl-unicode-linebreak")
1044 "/lib/perl5/site_perl" ":"
1045 (getenv "PERL5LIB")))
1049 `(("asciidoc" ,asciidoc)
1050 ("gettext" ,gettext-minimal)
1051 ("git" ,git-minimal)
1053 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1055 ("source-highlight" ,source-highlight)))
1056 (home-page "https://kicad.org")
1057 (synopsis "KiCad official documentation")
1058 (description "This repository contains the official KiCad documentation.")
1059 (license license:gpl3+)))
1061 (define-public kicad-symbols
1063 (name "kicad-symbols")
1064 (version (package-version kicad))
1068 (url "https://github.com/KiCad/kicad-symbols")
1070 (file-name (git-file-name name version))
1073 "12w3rdy085drlikkpb27n9ni7cyg9l0pqy7hnr86cxjcw3l5wcx6"))))
1074 (build-system cmake-build-system)
1076 `(#:tests? #f)) ; no tests exist
1077 (home-page (package-home-page kicad))
1078 (synopsis "Official KiCad schematic symbol libraries")
1079 (description "This package contains the official KiCad schematic symbol
1081 ;; TODO: Exception: "To the extent that the creation of electronic designs
1082 ;; that use 'Licensed Material' can be considered to be 'Adapted Material',
1083 ;; then the copyright holder waives article 3 of the license with respect to
1084 ;; these designs and any generated files which use data provided as part of
1085 ;; the 'Licensed Material'."
1086 ;; See <https://github.com/KiCad/kicad-symbols/blob/master/LICENSE.md>.
1087 (license license:cc-by-sa4.0)))
1089 (define-public kicad-footprints
1091 (inherit kicad-symbols)
1092 (name "kicad-footprints")
1093 (version (package-version kicad))
1097 (url "https://github.com/KiCad/kicad-footprints")
1099 (file-name (git-file-name name version))
1102 "1kmf91a5mmvj9izrv40mkaw1w36yjgn8daczd9rq2wlmd0rdp1zx"))))
1103 (synopsis "Official KiCad footprint libraries")
1104 (description "This package contains the official KiCad footprint libraries.")))
1106 (define-public kicad-packages3d
1108 (inherit kicad-symbols)
1109 (name "kicad-packages3d")
1110 (version (package-version kicad))
1114 (url "https://github.com/KiCad/kicad-packages3d")
1116 (file-name (git-file-name name version))
1119 "0b9jglf77fy0n0r8xs4yqkv6zvipyfvp0z5dnqlzp32csy5aqpi1"))))
1120 (synopsis "Official KiCad 3D model libraries")
1121 (description "This package contains the official KiCad 3D model libraries.")))
1123 (define-public kicad-templates
1125 (inherit kicad-symbols)
1126 (name "kicad-templates")
1127 (version (package-version kicad))
1131 (url "https://github.com/KiCad/kicad-templates")
1133 (file-name (git-file-name name version))
1136 "1hppcsrkn4dk6ggby6ckh0q65qxkywrbyxa4lwpaf7pxjyv498xg"))))
1137 (synopsis "Official KiCad project and worksheet templates")
1138 (description "This package contains the official KiCad project and
1139 worksheet templates.")))
1141 (define-public linsmith
1148 "mirror://sourceforge/linsmith/linsmith/linsmith-"
1149 version "/linsmith-" version ".tar.gz"))
1152 "13qj7n9826qc9shkkgd1p6vcpj78v4h9d67wbg45prg7rbnzkzds"))))
1153 (build-system gnu-build-system)
1155 `(("pkg-config" ,pkg-config)
1157 ("libgnome" ,libgnomeui)))
1158 (home-page "https://jcoppens.com/soft/linsmith/index.en.php")
1159 (synopsis "Smith Charting program")
1160 (description "LinSmith is a Smith Charting program, mainly designed for
1161 educational use. As such, there is an emphasis on capabilities that improve
1162 the 'showing the effect of'-style of operation.")
1163 (license license:gpl2+)))
1173 (url "https://github.com/gnuradio/volk")
1174 (commit (string-append "v" version))
1175 (recursive? #t))) ; for cpu_features git submodule
1176 (file-name (git-file-name name version))
1178 (base32 "1mkqiw0i2fbbsk46zvk8yv5swl7ifhq6y1dlfphq8dsmkvxckqby"))))
1179 (build-system cmake-build-system)
1182 (modify-phases %standard-phases
1183 (add-after 'install 'remove-static-libraries
1184 ;; Remove libcpu_features.a (and any others that might appear).
1185 (lambda* (#:key outputs #:allow-other-keys)
1186 (let* ((out (assoc-ref outputs "out"))
1187 (lib (string-append out "/lib")))
1188 (for-each delete-file (find-files lib "\\.a$"
1189 #:fail-on-error? #t))
1191 (add-after 'install 'wrap-pythonpath
1192 (lambda* (#:key inputs outputs #:allow-other-keys)
1193 (let* ((out (assoc-ref outputs "out"))
1194 (python (assoc-ref inputs "python"))
1195 (file (string-append out "/bin/volk_modtool"))
1196 (path (string-append
1199 ,(version-major+minor
1200 (package-version python))
1202 (getenv "PYTHONPATH"))))
1204 `("PYTHONPATH" ":" prefix (,path))
1206 (,(string-append python "/bin:")))))
1210 ("python" ,python-wrapper)
1211 ("python-mako" ,python-mako)))
1212 (home-page "https://www.libvolk.org/")
1213 (synopsis "Vector-Optimized Library of Kernels")
1215 "@acronym{VOLK, Vector-Optimized Library of Kernels} contains procedures
1216 with machine-specific optimizations for mathematical functions. It also
1217 provides a machine-independent interface to select the best such procedures to
1218 use on a given system.")
1219 (license license:gpl3+)))
1221 (define-public libredwg
1228 (uri (string-append "mirror://gnu/libredwg/libredwg-"
1231 (base32 "1vhm3r3zr8hh0jbvv6qdykh1x14r4c1arl1qj48i4cx2dd3366mk"))))
1232 (build-system gnu-build-system)
1234 `(#:configure-flags '("--disable-bindings")))
1236 `(("libxml2" ,libxml2)
1237 ("parallel" ,parallel)
1239 ("pkg-config" ,pkg-config)
1240 ("python" ,python-wrapper)
1241 ("python-libxml2" ,python-libxml2)))
1243 `(("pcre2" ,pcre2)))
1244 (home-page "https://www.gnu.org/software/libredwg/")
1245 (synopsis "C library to handle DWG (CAD-related) files")
1247 "GNU LibreDWG is a C library to handle DWG files. It aims to be a free
1248 replacement for the OpenDWG libraries.")
1249 (license license:gpl3+)))
1251 (define-public minicom
1259 (url "https://salsa.debian.org/minicom-team/minicom.git")
1260 (commit (string-append "v" version))))
1262 (base32 "0kfihxbh9qkjk9m1932ajyqx384c2aj3d9yaphh3i9i7y1shxlpx"))
1263 (file-name (git-file-name name version))))
1264 (build-system gnu-build-system)
1266 `(#:configure-flags '("--enable-lock-dir=/var/lock")
1268 (modify-phases %standard-phases
1269 (add-after 'unpack 'make-git-checkout-writable
1271 (for-each make-file-writable (find-files "."))))
1273 ;; autogen.sh needlessly hard-codes aclocal-1.14.
1275 (invoke "autoreconf" "-vif")
1277 (add-before 'configure 'patch-lock-check
1279 (substitute* "configure"
1280 (("test -d [$]UUCPLOCK") "true"))
1283 `(("autoconf" ,autoconf)
1284 ("automake" ,automake)
1285 ("gettext" ,gettext-minimal)
1286 ("pkg-config" ,pkg-config)))
1288 `(("ncurses" ,ncurses)))
1289 (home-page "https://salsa.debian.org/minicom-team/minicom")
1290 (synopsis "Serial terminal emulator")
1291 (description "@code{minicom} is a serial terminal emulator.")
1292 (license license:gpl2+)))
1294 (define-public harminv
1301 (string-append "https://github.com/stevengj/harminv/"
1302 "releases/download/v" version "/"
1303 name "-" version ".tar.gz"))
1306 "0w1n4d249vlpda0hi6z1v13qp21vlbp3ykn0m8qg4rd5132j7fg1"))))
1307 (build-system gnu-build-system)
1309 `(#:configure-flags '("--enable-shared")
1311 (modify-phases %standard-phases
1312 (add-before 'configure 'fix-tests
1314 (substitute* "./sines-test.sh"
1315 ; change test frequency range - default fails
1316 (("0\\.15") "0.16"))
1319 `(("fortran" ,gfortran)))
1321 `(("lapack" ,lapack)))
1322 (home-page "https://github.com/stevengj/harminv")
1323 (synopsis "Harmonic inversion solver")
1325 "Harminv is a free program (and accompanying library) to solve the problem of
1326 harmonic inversion — given a discrete-time, finite-length signal that consists of a sum
1327 of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
1328 determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
1329 (license license:gpl2+)))
1331 (define-public guile-libctl
1333 (name "guile-libctl")
1339 "https://github.com/NanoComp/libctl/releases/download/v"
1340 version "/libctl-" version ".tar.gz"))
1343 "0x8r56lpfq83kfbq28vr25icl19xpfd6fjrxzcpdmv30l9pash83"))))
1344 (build-system gnu-build-system)
1346 `(#:configure-flags '("--enable-shared")))
1348 `(("fortran" ,gfortran)))
1350 `(("guile" ,guile-2.2)))
1351 (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl")
1352 (synopsis "Flexible control files implementation for scientific simulations")
1354 "Libctl is a Guile-based library implementing flexible control files
1355 for scientific simulations.")
1356 (license license:gpl2+)))
1366 "https://github.com/NanoComp/mpb/releases/download/v"
1367 version "/mpb-" version ".tar.gz"))
1370 "1jgrb7dd6qs6j6y1gnxmdgrh79l2bvqa6nk60a4pw1annsks4brd"))))
1371 (build-system gnu-build-system)
1374 (list (string-append "--with-libctl="
1375 (assoc-ref %build-inputs "libctl")
1377 "--enable-shared")))
1379 `(("fortran" ,gfortran)
1380 ("pkg-config" ,pkg-config)
1385 ("guile" ,guile-2.2)
1388 ("libctl" ,guile-libctl)
1389 ("readline" ,readline)
1391 (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands")
1392 (synopsis "Computes band structures and electromagnetic modes of dielectric
1395 "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes)
1396 of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
1397 fully-vectorial and three-dimensional methods.")
1398 (license license:gpl2+)))
1408 "https://github.com/NanoComp/meep/releases/download/v"
1409 version "/meep-" version ".tar.gz"))
1412 "14zyxmm3p80j5fz5b89sl7hgkgcisqjny5hjh4pi274ziqjqz8bm"))))
1413 (build-system gnu-build-system)
1416 (list (string-append "--with-libctl="
1417 (assoc-ref %build-inputs "libctl")
1420 `(("fortran" ,gfortran)
1421 ("pkg-config" ,pkg-config)
1426 ("guile" ,guile-2.2)
1427 ("harminv" ,harminv)
1430 ("libctl" ,guile-libctl)
1433 (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep")
1434 (synopsis "Finite-difference time-domain (FDTD) simulation software")
1436 "Meep is a finite-difference time-domain (FDTD) simulation software package
1437 developed at MIT to model electromagnetic systems.")
1438 (license license:gpl2+)))
1447 (url "https://github.com/Qucs/ADMS")
1448 (commit (string-append "release-" version))))
1449 (file-name (git-file-name name version))
1452 "0i37c9k6q1iglmzp9736rrgsnx7sw8xn3djqbbjw29zsyl3pf62c"))))
1453 (build-system gnu-build-system)
1455 `(("autoconf" ,autoconf)
1456 ("automake" ,automake)
1459 ("libtool" ,libtool)
1461 ("perl-xml-libxml" ,perl-xml-libxml)))
1462 (home-page "https://github.com/Qucs/ADMS")
1463 (synopsis "Automatic device model synthesizer")
1465 "ADMS is a code generator that converts electrical compact device models
1466 specified in high-level description language into ready-to-compile C code for
1467 the API of spice simulators. Based on transformations specified in XML
1468 language, ADMS transforms Verilog-AMS code into other target languages.")
1469 (license license:gpl3)))
1471 (define-public capstone
1478 (url "https://github.com/aquynh/capstone")
1480 (file-name (git-file-name name version))
1483 "0dgf82kxj4rs45d6s8sr984c38sll1n5scpypjlyh21gh2yl4qfw"))))
1484 (build-system gnu-build-system)
1487 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1490 (modify-phases %standard-phases
1491 (delete 'configure) ; no configure script
1492 ;; cstool's Makefile ‘+=’s LDFLAGS, so we cannot pass it as a make flag.
1493 (add-before 'build 'fix-cstool-ldflags
1494 (lambda* (#:key outputs #:allow-other-keys)
1495 (setenv "LDFLAGS" (string-append "-Wl,-rpath="
1496 (assoc-ref outputs "out") "/lib"))
1498 (home-page "https://www.capstone-engine.org")
1499 (synopsis "Lightweight multi-platform, multi-architecture disassembly framework")
1501 "Capstone is a lightweight multi-platform, multi-architecture disassembly
1502 framework. Capstone can disassemble machine code for many supported architectures
1503 such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and xcore. It provides
1504 bindings for Python, Java, OCaml and more.")
1505 (license license:bsd-3)))
1507 ;; FIXME: This package has a timestamp embedded in
1508 ;; lib/python3.5/site-packages/capstone/__pycache__/__iti__.cpython-35.pyc
1509 (define-public python-capstone
1512 (name "python-capstone")
1514 `(("capstone" ,capstone)))
1515 (build-system python-build-system)
1518 (modify-phases %standard-phases
1519 (add-after 'unpack 'chdir-and-fix-setup-py
1521 (chdir "bindings/python")
1522 ;; Do not build the library again, because we already have it.
1523 (substitute* "setup.py" ((".* build_libraries.*") ""))
1524 ;; This substitution tells python-capstone where to find the
1526 (substitute* "capstone/__init__.py"
1527 (("pkg_resources.resource_filename.*")
1528 (string-append "'" (assoc-ref %build-inputs "capstone") "/lib',\n")))
1531 (define-public python2-capstone
1532 (package-with-python2 python-capstone))
1535 (define-public python-esptool-3.0
1537 (name "python-esptool")
1542 (uri (pypi-uri "esptool" version))
1545 "0d69rd9h8wrzjvfrc66vmz4qd5hly2fpdcwj2bdrlb7dbwikv5c7"))))
1546 (build-system python-build-system)
1548 `(#:tests? #f)) ;XXX: require python-reedsolo
1550 `(("python-ecdsa" ,python-ecdsa)
1551 ("python-pyaes" ,python-pyaes)
1552 ("python-pyserial" ,python-pyserial)))
1553 (home-page "https://github.com/espressif/esptool")
1554 (synopsis "Bootloader utility for Espressif ESP8266 & ESP32 chips")
1556 "@code{esptool.py} is a Python-based utility to communicate with the ROM
1557 bootloader in Espressif ESP8266 & ESP32 series chips.")
1558 (license license:gpl2+)))
1560 (define-public radare2
1567 (url "https://github.com/radareorg/radare2")
1571 "0hv9x31iabasj12g8f04incr1rbcdkxi3xnqn3ggp8gl4h6pf2f3"))
1572 (file-name (git-file-name name version))))
1573 (build-system gnu-build-system)
1575 '(#:tests? #f ; tests require git and network access
1577 (modify-phases %standard-phases
1578 (add-before 'configure 'mklibdir
1579 (lambda* (#:key inputs outputs #:allow-other-keys)
1580 (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))
1583 (list "--with-openssl"
1585 "--with-syscapstone"
1591 ;; TODO: Add gmp and libzip and make the build system actually find them.
1593 `(("capstone" ,capstone)
1595 ("openssl" ,openssl)
1598 `(("pkg-config" ,pkg-config)))
1600 ;; In the Libs: section of r_hash.pc.
1601 `(("xxhash" ,xxhash)))
1602 (home-page "https://radare.org/")
1603 (synopsis "Reverse engineering framework")
1605 "Radare2 is a complete framework for reverse-engineering, debugging, and
1606 analyzing binaries. It is composed of a set of small utilities that can be
1607 used together or independently from the command line.
1609 Radare2 is built around a scriptable disassembler and hexadecimal editor that
1610 support a variety of executable formats for different processors and operating
1611 systems, through multiple back ends for local and remote files and disk
1614 It can also compare (@dfn{diff}) binaries with graphs and extract information
1615 like relocation symbols. It is able to deal with malformed binaries, making
1616 it suitable for security research and analysis.")
1617 (license license:lgpl3)))
1625 (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
1629 "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
1630 (build-system gnu-build-system)
1632 `(#:tests? #f ; no tests
1633 #:make-flags '("all" "asco-mpi")
1635 (modify-phases %standard-phases
1637 (add-before 'build 'fix-paths
1638 (lambda* (#:key inputs #:allow-other-keys)
1639 (let ((coreutils (assoc-ref inputs "coreutils-minimal")))
1640 (substitute* '("errfunc.c" "asco.c")
1642 (string-append coreutils "/bin/cp "))
1644 (string-append coreutils "/bin/nice")))
1645 (substitute* "Makefile"
1646 (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
1648 (replace 'install ; no install target
1649 (lambda* (#:key outputs #:allow-other-keys)
1650 (for-each (lambda (file)
1651 (install-file file (string-append
1652 (assoc-ref outputs "out")
1654 '("asco" "asco-mpi" "asco-test"
1655 "tools/alter/alter" "tools/log/log"))
1658 `(("mpi" ,openmpi)))
1660 `(("coreutils-minimal" ,coreutils-minimal)))
1661 (home-page "http://asco.sourceforge.net/")
1662 (synopsis "SPICE circuit optimizer")
1664 "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
1665 high-performance parallel differential evolution (DE) optimization algorithm.")
1666 (license license:gpl2+)))
1668 (define-public libngspice
1669 ;; Note: The ngspice's build system does not allow us to build both the
1670 ;; library and the executables in one go. Thus, we have two packages.
1671 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>.
1678 (string-append "mirror://sourceforge/ngspice/ng-spice-rework/"
1679 version "/ngspice-" version ".tar.gz")
1680 (string-append "mirror://sourceforge/ngspice/ng-spice-rework/"
1681 "old-releases/" version
1682 "/ngspice-" version ".tar.gz")))
1685 "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l"))
1686 (modules '((guix build utils)))
1687 ;; We remove the non-free cider and build without it.
1690 (delete-file-recursively "src/ciderlib")
1691 (delete-file "src/ciderinit")
1692 (substitute* "configure"
1693 (("src/ciderlib/Makefile") "")
1694 (("src/ciderlib/input/Makefile") "")
1695 (("src/ciderlib/support/Makefile") "")
1696 (("src/ciderlib/oned/Makefile") "")
1697 (("src/ciderlib/twod/Makefile") ""))
1699 (build-system gnu-build-system)
1701 `(;; No tests for libngspice exist.
1702 ;; The transient tests for ngspice fail.
1705 (modify-phases %standard-phases
1706 (add-after 'unpack 'patch-timestamps
1708 (substitute* "configure"
1709 (("`date`") "Thu Jan 1 00:00:01 UTC 1970"))
1711 (add-after 'unpack 'delete-program-manuals
1713 (substitute* "man/man1/Makefile.in"
1714 (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1 ngmultidec\\.1")
1717 (add-after 'install 'delete-script-files
1718 (lambda* (#:key outputs #:allow-other-keys)
1719 (delete-file-recursively
1720 (string-append (assoc-ref outputs "out")
1721 "/share/ngspice/scripts")))))
1723 (list "--enable-openmp"
1726 "--with-readline=yes")))
1731 `(("libxaw" ,libxaw)
1733 ("readline" ,readline)))
1734 (home-page "http://ngspice.sourceforge.net/")
1735 (synopsis "Mixed-level/mixed-signal circuit simulator")
1737 "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes
1738 @code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that
1739 provides code modeling support and simulation of digital components through
1740 an embedded event driven algorithm.")
1741 (license (list license:lgpl2.0+ ; code in frontend/numparam
1742 (license:non-copyleft "file:///COPYING") ; spice3 bsd-style
1743 license:public-domain)))) ; xspice
1745 (define-public ngspice
1746 ;; The ngspice executables (see libngpsice above.)
1747 (package (inherit libngspice)
1750 (substitute-keyword-arguments (package-arguments libngspice)
1751 ((#:configure-flags flags)
1752 `(delete "--with-ngshared" ,flags))
1754 `(modify-phases ,phases
1755 (add-after 'unpack 'delete-include-files
1757 (substitute* "src/Makefile.in"
1758 (("^SUBDIRS = misc maths frontend spicelib include/ngspice")
1759 "SUBDIRS = misc maths frontend spicelib"))
1761 (add-after 'install 'delete-cmpp-dlmain
1762 (lambda* (#:key outputs #:allow-other-keys)
1763 (for-each (lambda (file)
1765 (string-append (assoc-ref outputs "out")
1767 '("/bin/cmpp" "/share/ngspice/dlmain.c"))
1769 (delete 'delete-program-manuals)
1770 (delete 'delete-script-files)))))
1772 `(("libngspice" ,libngspice)
1773 ("readline" ,readline)))))
1775 (define trilinos-serial-xyce
1776 ;; Note: This is a Trilinos containing only the packages Xyce needs, so we
1777 ;; keep it private. See
1778 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#248>.
1779 ;; TODO: Remove when we have modular Trilinos packages?
1781 (name "trilinos-serial-xyce")
1784 (origin (method url-fetch)
1785 (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
1786 version "-Source.tar.gz"))
1789 "1zgrcksrcbmyy79mbdv0j4j4sh0chpigxk8vcrrwgaxyxwxxhrvw"))))
1790 (build-system cmake-build-system)
1792 `(#:out-of-source? #t
1794 (modify-phases %standard-phases
1795 ;; Delete unneeded tribits(build system) directory which makes validate-runpath
1797 (add-before 'validate-runpath 'delete-tribits
1798 (lambda* (#:key outputs #:allow-other-keys)
1799 (delete-file-recursively
1800 (string-append (assoc-ref outputs "out")
1801 "/lib/cmake/tribits"))
1804 (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
1805 "-DCMAKE_C_FLAGS=-O3 -fPIC"
1806 "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
1807 "-DTrilinos_ENABLE_NOX=ON"
1808 "-DNOX_ENABLE_LOCA=ON"
1809 "-DTrilinos_ENABLE_EpetraExt=ON"
1810 "-DEpetraExt_BUILD_BTF=ON"
1811 "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
1812 "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
1813 "-DTrilinos_ENABLE_TrilinosCouplings=ON"
1814 "-DTrilinos_ENABLE_Ifpack=ON"
1815 "-DTrilinos_ENABLE_Isorropia=ON"
1816 "-DTrilinos_ENABLE_AztecOO=ON"
1817 "-DTrilinos_ENABLE_Belos=ON"
1818 "-DTrilinos_ENABLE_Teuchos=ON"
1819 "-DTeuchos_ENABLE_COMPLEX=ON"
1820 "-DTrilinos_ENABLE_Amesos=ON"
1821 "-DAmesos_ENABLE_KLU=ON"
1822 "-DAmesos_ENABLE_UMFPACK=ON"
1823 "-DTrilinos_ENABLE_Sacado=ON"
1824 "-DTrilinos_ENABLE_Kokkos=OFF"
1825 "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
1826 "-DTPL_ENABLE_AMD=ON"
1827 "-DTPL_ENABLE_UMFPACK=ON"
1828 "-DTPL_ENABLE_BLAS=ON"
1829 "-DTPL_ENABLE_LAPACK=ON")))
1831 `(("fortran" ,gfortran)
1836 ("suitesparse" ,suitesparse)))
1837 (home-page "https://trilinos.org")
1838 (synopsis "Engineering and scientific problems algorithms")
1840 "The Trilinos Project is an effort to develop algorithms and enabling
1841 technologies within an object-oriented software framework for the solution of
1842 large-scale, complex multi-physics engineering and scientific problems. A
1843 unique design feature of Trilinos is its focus on packages.")
1844 (license (list license:lgpl2.1+
1847 (define-public xyce-serial
1849 (name "xyce-serial")
1852 (origin (method url-fetch)
1853 (uri (string-append "https://archive.org/download/Xyce-"
1854 version "/Xyce-" version ".tar.gz"))
1857 "09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
1858 (build-system gnu-build-system)
1864 (string-append "ARCHDIR="
1865 (assoc-ref %build-inputs "trilinos")))))
1867 `(("bison" ,bison-3.0) ;'configure' fails with Bison 3.4
1869 ("fortran" ,gfortran)))
1872 ("suitesparse" ,suitesparse)
1874 ("trilinos" ,trilinos-serial-xyce)))
1875 (home-page "https://xyce.sandia.gov/")
1876 (synopsis "High-performance analog circuit simulator")
1878 "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
1879 capable of solving extremely large circuit problems by supporting large-scale
1880 parallel computing platforms. It also supports serial execution.")
1881 (license license:gpl3+)))
1883 (define trilinos-parallel-xyce
1884 (package (inherit trilinos-serial-xyce)
1885 (name "trilinos-parallel-xyce")
1887 `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
1888 ((#:configure-flags flags)
1889 `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
1890 "-DTrilinos_ENABLE_Zoltan=ON"
1891 "-DTPL_ENABLE_MPI=ON")
1895 ,@(package-inputs trilinos-serial-xyce)))))
1897 (define-public xyce-parallel
1898 (package (inherit xyce-serial)
1899 (name "xyce-parallel")
1901 `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
1902 ((#:configure-flags flags)
1903 `(list "CXXFLAGS=-O3"
1910 (assoc-ref %build-inputs "trilinos")))))))
1912 `(("mpi" ,openmpi)))
1914 `(("trilinos" ,trilinos-parallel-xyce)
1915 ,@(alist-delete "trilinos"
1916 (package-inputs xyce-serial))))))
1918 (define-public freehdl
1924 (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
1928 "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))
1931 ;; Fix build with GCC 7. Patch taken from Arch Linux:
1932 ;; https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/freehdl
1934 (uri "https://git.archlinux.org/svntogit/community.git\
1935 /plain/trunk/build-fix.patch?h=packages/freehdl\
1936 &id=3bb90d64dfe6883e26083cd1fa96226d0d59175a")
1937 (file-name "freehdl-c++-namespace.patch")
1940 "09df3c70rx81rnhlhry1wpdhji274nx9jb74rfprk06l4739zm08")))))))
1941 (build-system gnu-build-system)
1944 (modify-phases %standard-phases
1945 (add-before 'configure 'patch-pkg-config
1946 (lambda* (#:key inputs #:allow-other-keys)
1947 (substitute* "freehdl/freehdl-config"
1949 (string-append (assoc-ref inputs "pkg-config")
1952 (string-append (assoc-ref inputs "coreutils")
1955 (add-after 'patch-pkg-config 'setenv
1956 (lambda* (#:key inputs #:allow-other-keys)
1957 (setenv "CXX" (string-append (assoc-ref inputs "gcc")
1959 (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
1962 (add-after 'setenv 'patch-gvhdl
1964 (substitute* "v2cc/gvhdl.in"
1965 (("--mode=link") "--mode=link --tag=CXX")
1966 (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
1968 (add-after 'patch-gvhdl 'patch-freehdl-gennodes
1969 (lambda* (#:key inputs #:allow-other-keys)
1970 (substitute* "freehdl/freehdl-gennodes.in"
1972 (string-append (assoc-ref inputs "guile") "/bin/guile"))
1973 (("\\(debug") ";(debug")
1974 (("\\(@ ") "(apply-emit")
1975 (("\\(@@ ") "(apply-mini-format"))
1977 (add-after 'configure 'patch-freehdl-pc
1978 (lambda* (#:key inputs #:allow-other-keys)
1979 (substitute* "freehdl.pc"
1981 (string-append "=" (assoc-ref inputs "gcc-toolchain")
1984 (string-append "=" (assoc-ref inputs "libtool")
1987 (add-after 'install-scripts 'make-wrapper
1988 (lambda* (#:key inputs outputs #:allow-other-keys)
1989 (let ((out (assoc-ref outputs "out")))
1990 ;; 'gvhdl' invokes the C compiler directly, so hard-code its
1992 (wrap-program (string-append out "/bin/gvhdl")
1993 `("CPLUS_INCLUDE_PATH" ":" prefix
1994 (,(string-append (assoc-ref inputs "gcc-toolchain")
1996 `("LIBRARY_PATH" ":" prefix
1997 (,(string-append (assoc-ref inputs "gcc-toolchain")
2000 (,(string-append (assoc-ref inputs "gcc-toolchain")
2002 ,(string-append (assoc-ref inputs "coreutils")
2004 (wrap-program (string-append out "/bin/freehdl-config")
2005 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
2008 `(("coreutils" ,coreutils)
2009 ("gcc-toolchain" ,gcc-toolchain)
2010 ("guile" ,guile-2.2)
2012 ("pkg-config" ,pkg-config)
2013 ("libtool" ,libtool)))
2015 `(("pkg-config-native" ,pkg-config)
2016 ("libtool-native" ,libtool)))
2017 (home-page "http://www.freehdl.seul.org/")
2018 (synopsis "VHDL simulator")
2020 "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
2021 VHDL'93 as well as VHDL'87 standards are supported.")
2022 (license (list license:gpl2+
2023 license:lgpl2.0+)))) ; freehdl's libraries
2025 (define-public librepcb
2032 (uri (string-append "https://download.librepcb.org/releases/"
2033 version "/librepcb-" version "-source.zip"))
2035 (base32 "1b5dkanz3q0y5ag80w0l85hn7axrachb5m9zvyv4zvzrfy09wa88"))))
2036 (build-system gnu-build-system)
2038 `(("qtbase" ,qtbase)
2042 `(("qttools" ,qttools) ; for lrelease
2046 (modify-phases %standard-phases
2048 (lambda* (#:key inputs outputs #:allow-other-keys)
2051 (let ((lrelease (string-append (assoc-ref inputs "qttools")
2053 (out (assoc-ref outputs "out")))
2055 (string-append "QMAKE_LRELEASE=" lrelease)
2056 (string-append "PREFIX=" out)
2057 "../librepcb.pro")))))))
2058 (home-page "https://librepcb.org/")
2059 (synopsis "Electronic Design Automation tool")
2060 (description "LibrePCB is @dfn{Electronic Design Automation} (EDA)
2061 software to develop printed circuit boards. It features human readable file
2062 formats and complete project management with library, schematic and board
2064 (license (list license:gpl3+
2065 license:boost1.0 ; libs/clipper,
2066 ; libs/optional/tests/catch.hpp,
2067 ; libs/sexpresso/tests/catch.hpp
2068 license:expat ; libs/delaunay-triangulation,
2069 ; libs/parseagle, libs/type_safe
2070 license:asl2.0 ; libs/fontobene, libs/googletest,
2072 license:isc ; libs/hoedown
2073 license:cc0 ; libs/optional, libs/sexpresso
2074 license:bsd-2 ; libs/optional/tests/catch.hpp
2075 license:lgpl2.1+)))) ; libs/quazip
2084 (url "https://github.com/markwal/GPX")
2086 (file-name (git-file-name name version))
2089 "1yab269x8qyf7rd04vaxyqyjv4pzz9lp4sc4dwh927k23avr3rw5"))))
2090 (build-system gnu-build-system)
2091 (home-page "https://github.com/markwal/GPX")
2092 (synopsis "Converting gcode to x3g files for 3D printing")
2094 "GPX is a post processing utility for converting gcode output from 3D
2095 slicing software to x3g files for standalone 3D printing on common 3D
2097 (license license:gpl2+)))
2099 (define-public gnucap
2102 (version "20171003")
2106 (uri (string-append "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-"
2110 "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g"))))
2111 (build-system gnu-build-system)
2113 `(("readline" ,readline)))
2116 (modify-phases %standard-phases
2118 (lambda* (#:key outputs #:allow-other-keys)
2119 (let ((out (assoc-ref outputs "out")))
2120 ;; Set correct rpath so that gnucap finds libgnucap.so.
2121 (substitute* (list "apps/configure" "lib/configure"
2122 "main/configure" "modelgen/configure")
2124 (string-append "LDFLAGS = -Wl,-rpath=" out "/lib")))
2125 ;; gnucap uses a hand-written configure script that expects the
2126 ;; --prefix argument to be the first argument passed to it.
2127 (invoke "./configure" (string-append "--prefix=" out)))))
2129 (lambda* (#:key outputs #:allow-other-keys)
2130 (let ((out (assoc-ref outputs "out"))
2131 (libpath "../lib/O:../apps/O"))
2132 (with-directory-excursion "tests"
2133 ;; Make test return non-zero exit code when a test fails.
2135 (("/bin/sh") "/bin/sh -e")
2136 (("\\|\\| echo \"\\*\\*\\*\\* \\$ii fails \\*\\*\\*\\*\"") ""))
2137 ;; Fix expected plugin search path for test c_attach.1.gc
2138 (substitute* "==out/c_attach.1.gc.out"
2139 (("/usr/local/lib/gnucap")
2140 (string-append libpath ":" out "/lib/gnucap")))
2141 ;; Set library path so that gnucap can find libgnucap.so
2142 ;; while running the tests.
2143 (setenv "LD_LIBRARY_PATH" libpath)
2144 (invoke "./test" "../main/O/gnucap" "" "test-output" "==out"))))))))
2145 (home-page "https://www.gnu.org/software/gnucap/")
2146 (synopsis "Mixed analog and digital circuit simulator")
2147 (description "GNUcap is a circuit analysis package. It offers a general
2148 purpose circuit simulator and can perform DC and transient analyses, fourier
2149 analysis and AC analysis. The engine is designed to do true mixed-mode
2151 (license license:gpl3+)))
2153 (define-public radare2-for-cutter
2161 (url "https://github.com/radareorg/radare2")
2165 "0aa7c27kd0l55fy5qfvxqmakp4pz6240v3hn84095qmqkzcbs420"))
2166 (file-name (git-file-name name version))))))
2168 (define-public cutter
2176 (url "https://github.com/radareorg/cutter")
2177 (commit (string-append "v" version))))
2178 (file-name (git-file-name name version))
2180 (base32 "0ljj3j3apbbw628n2nyrxpbnclixx20bqjxm0xwggqzz9vywsar0"))))
2181 (build-system gnu-build-system)
2184 (modify-phases %standard-phases
2186 (lambda* (#:key inputs outputs #:allow-other-keys)
2187 (let ((out (assoc-ref outputs "out"))
2188 (radare2 (assoc-ref inputs "radare2")))
2189 ;; Fix pkg-config detection ./src/lib_radare2.pri:PREFIX=/usr/lib
2190 ;; override `qmake PREFIX=`.
2191 (substitute* "./src/lib_radare2.pri"
2192 (("PREFIX") "R2PREFIX")
2193 (("R2PREFIX=/usr") (string-append "R2PREFIX=" radare2)))
2195 (string-append "PREFIX=" out)
2196 "./src/Cutter.pro")))))))
2198 `(("pkg-config" ,pkg-config)))
2200 `(("qtbase" ,qtbase)
2202 ("openssl" ,openssl)
2203 ;; Depends on radare2 4.5.1 officially, builds and works fine with
2204 ;; radare2 5.0.0 but fails to build with radare2 5.1.1.
2205 ("radare2" ,radare2-for-cutter)))
2206 (home-page "https://github.com/radareorg/cutter")
2207 (synopsis "GUI for radare2 reverse engineering framework")
2208 (description "Cutter is a GUI for radare2 reverse engineering framework.
2209 Its goal is making an advanced andcustomizable reverse-engineering platform
2210 while keeping the user experience at mind. Cutter is created by reverse
2211 engineers for reverse engineers.")
2212 (license (list license:cc-by-sa3.0 ;the "Iconic" icon set
2213 license:gpl3+)))) ;everything else
2215 (define-public lib3mf
2222 (uri (git-reference (url "https://github.com/3MFConsortium/lib3mf")
2223 (commit (string-append "v" version))))
2224 (file-name (git-file-name name version))
2227 "1417xlxc1y5jnipixhbjfrrjgkrprbbraj8647sff9051m3hpxc3"))))
2228 (build-system cmake-build-system)
2230 `(#:configure-flags (list "-DUSE_INCLUDED_ZLIB=0"
2231 "-DUSE_INCLUDED_LIBZIP=0"
2232 "-DUSE_INCLUDED_GTEST=0"
2233 "-DUSE_INCLUDED_SSL=0")))
2235 `(("googletest" ,googletest)
2236 ("pkg-config" ,pkg-config)))
2238 `(("libuuid" ,util-linux "lib")
2240 ("libressl" ,libressl)
2242 (synopsis "Implementation of the 3D Manufacturing Format (3MF) file standard")
2244 "Lib3MF is a C++ implementation of the 3D Manufacturing Format (3MF) file
2245 standard. It offers a way to integrate 3MF reading and writing capabilities, as
2246 well as conversion and validation tools for input and output data. The
2247 specification can be downloaded at @url{http://3mf.io/specification/}.")
2248 (home-page "https://3mf.io/")
2249 (license license:bsd-2)))
2251 (define-public openscad
2258 (uri (string-append "https://files.openscad.org/openscad-" version
2262 "0n83szr88h8snccjrslr96mgw3f65x3sq726n6x5vxp5wybw4f6r"))))
2263 (build-system cmake-build-system)
2267 ("double-conversion" ,double-conversion)
2269 ("fontconfig" ,fontconfig)
2272 ("harfbuzz" ,harfbuzz)
2274 ("libxml2" ,libxml2)
2277 ("opencsg" ,opencsg)
2278 ("qscintilla" ,qscintilla)
2280 ("qtmultimedia" ,qtmultimedia)))
2284 ("gettext" ,gettext-minimal)
2285 ("pkg-config" ,pkg-config)
2287 ;; the following are only needed for tests
2288 ("imagemagick" ,imagemagick)
2291 ("xvfb" ,xorg-server-for-tests)))
2294 (modify-phases %standard-phases
2296 (lambda* (#:key outputs #:allow-other-keys)
2298 (string-append "PREFIX=" (assoc-ref outputs "out")))
2302 (with-directory-excursion "tests"
2303 (invoke "cmake" ".")
2305 (invoke "ctest" "--exclude-regex"
2308 "astdumptest_allexpressions"
2309 "echotest_function-literal-compare"
2310 "echotest_function-literal-tests"
2311 "echotest_allexpressions"
2313 "pdfexporttest_centered"
2314 "pdfexporttest_simple-pdf"
2316 ;; Broken due since cgal@5.2 +
2317 ;; https://github.com/CGAL/cgal/pull/5371 (security)
2318 ;; FIXME: Investigate or wait for future releases to
2320 ;; Unsure if wrong test-suite or wrong security
2322 "cgalpngtest_nef3_broken"
2323 "opencsgtest_nef3_broken"
2324 "csgpngtest_nef3_broken"
2325 "throwntogethertest_nef3_broken")
2327 ;; strip python test files since lib dir ends up in out/share
2328 (for-each delete-file
2329 (find-files "libraries/MCAD" ".*\\.py"))
2331 (synopsis "Script-based 3D modeling application")
2333 "OpenSCAD is a 3D Computer-aided Design (CAD) application. Unlike an
2334 interactive modeler, OpenSCAD generates 3D models from a script, giving you
2335 full programmatic control over your models.")
2336 (home-page "https://www.openscad.org/")
2337 (license license:gpl2+)))
2339 (define-public emacs-scad-mode
2342 (name "emacs-scad-mode")
2345 (build-system emacs-build-system)
2348 (modify-phases %standard-phases
2349 (add-after 'unpack 'chdir-elisp
2350 ;; Elisp directory is not in root of the source.
2354 (synopsis "Emacs major mode for editing editing OpenSCAD code")
2355 (description "@code{scad-mode} provides an Emacs major mode for editing
2356 OpenSCAD code. It supports syntax highlighting, indenting and refilling of
2359 (define-public freecad
2367 (url "https://github.com/FreeCAD/FreeCAD")
2369 (file-name (git-file-name name version))
2372 "0c53q2iawy4yfp11czyc7lbr9ivp3r7v24x4c20myh11wyplffc0"))))
2373 (build-system qt-build-system)
2375 `(("doxygen" ,doxygen)
2376 ("graphviz" ,graphviz)
2377 ("qttools" ,qttools)
2378 ("pkg-config" ,pkg-config)
2379 ("python-pyside-2-tools" ,python-pyside-2-tools)
2384 ("double-conversion" ,double-conversion)
2386 ("freetype" ,freetype)
2390 ("jsoncpp" ,jsoncpp)
2391 ("libarea" ,libarea)
2392 ("libjpeg-turbo" ,libjpeg-turbo)
2393 ("libmedfile" ,libmedfile)
2394 ("libspnav" ,libspnav)
2395 ("libtheora" ,libtheora)
2396 ("libtiff" ,libtiff)
2398 ("libxmlplusplus" ,libxmlplusplus)
2402 ("opencascade-occt" ,opencascade-occt)
2403 ("openmpi" ,openmpi)
2405 ("python-gitpython" ,python-gitpython)
2406 ("python-matplotlib" ,python-matplotlib)
2407 ("python-pivy" ,python-pivy)
2408 ("python-pyside-2" ,python-pyside-2)
2409 ("python-pyyaml" ,python-pyyaml)
2410 ("python-shiboken-2" ,python-shiboken-2)
2411 ("python-wrapper" ,python-wrapper)
2414 ("qtwebkit" ,qtwebkit)
2415 ("qtx11extras" ,qtx11extras)
2416 ("qtxmlpatterns" ,qtxmlpatterns)
2420 ("xerces-c" ,xerces-c)
2423 `(#:tests? #f ; Project has no tests
2427 "-DBUILD_FLAT_MESH:BOOL=ON"
2428 (string-append "-DCMAKE_INSTALL_LIBDIR=" (assoc-ref %outputs "out") "/lib")
2429 (string-append "-DPYSIDE2UICBINARY="
2430 (assoc-ref %build-inputs "python-pyside-2-tools")
2432 (string-append "-DPYSIDE2RCCBINARY="
2433 (assoc-ref %build-inputs "python-pyside-2-tools")
2435 "-DPYSIDE_LIBRARY=PySide2::pyside2"
2437 "-DPYSIDE_INCLUDE_DIR="
2438 (assoc-ref %build-inputs "python-pyside-2") "/include;"
2439 (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2;"
2440 (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtCore;"
2441 (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtWidgets;"
2442 (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtGui;")
2443 "-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
2444 (string-append "-DSHIBOKEN_INCLUDE_DIR="
2445 (assoc-ref %build-inputs "python-shiboken-2")
2446 "/include/shiboken2"))
2448 (modify-phases %standard-phases
2449 (add-before 'configure 'restore-pythonpath
2451 (substitute* "src/Main/MainGui.cpp"
2452 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))))
2453 (add-after 'install 'wrap-pythonpath
2454 (lambda* (#:key outputs #:allow-other-keys)
2455 (let ((out (assoc-ref outputs "out")))
2456 (wrap-program (string-append out "/bin/FreeCAD")
2458 'prefix (list (getenv "PYTHONPATH"))))))))))
2459 (home-page "https://www.freecadweb.org/")
2460 (synopsis "Your Own 3D Parametric Modeler")
2462 "FreeCAD is a general purpose feature-based, parametric 3D modeler for
2463 CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
2464 product design but also fits a wider range of uses in engineering, such as
2465 architecture or other engineering specialties. It is 100% Open Source (LGPL2+
2466 license) and extremely modular, allowing for very advanced extension and
2475 (define-public libmedfile
2483 "https://files.salome-platform.org/Salome/other/med-"
2487 "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
2488 (build-system cmake-build-system)
2489 (inputs `(("hdf5" ,hdf5-1.10)))
2492 (modify-phases %standard-phases
2493 (add-after 'install 'remove-test-output
2494 (lambda* (#:key outputs #:allow-other-keys)
2495 (let ((out (assoc-ref outputs "out")))
2496 (delete-file-recursively
2497 (string-append out "/bin/testc"))
2499 (home-page "https://www.salome-platform.org")
2500 (synopsis "Library to read and write MED files")
2502 "The purpose of the MED module is to provide a standard for storing and
2503 recovering computer data associated to numerical meshes and fields, and to
2504 facilitate the exchange between codes and solvers.
2506 The persistent data storage is based upon HDF format (like CGNS, a standard
2507 developed by Boeing and NASA in the area of Computational Fluid Dynamic).
2509 MED also provides structures to hold data on meshes and fields. These
2510 structures are exchanged between solvers, hide the communication level (CORBA
2511 or MPI), and offer persistence (read/write in .med files).
2513 The main benefit of a common exchange format is reduced complexity of code
2514 coupling. It also allows sharing such high level functionalities as
2515 computation of nodal connectivity of sub-elements (faces and edges),
2516 arithmetic operations on fields, entity location functionalities, and
2517 interpolation toolkit.")
2518 (license license:gpl3+)))
2520 (define-public libarea
2521 (let ((revision "1")
2522 (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
2525 (version (git-version "0" revision commit))
2529 (uri (git-reference (url "https://github.com/Heeks/libarea")
2531 (file-name (git-file-name name version))
2533 (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
2534 (build-system gnu-build-system)
2535 (inputs `(("boost" ,boost)
2536 ("python-wrapper" ,python-wrapper)))
2538 `(("cmake" ,cmake-minimal)))
2542 (modify-phases %standard-phases
2543 (add-after 'configure 'cmake-configure
2544 (lambda* (#:key inputs outputs #:allow-other-keys)
2545 (let ((out (assoc-ref outputs "out"))
2546 (cmake (assoc-ref inputs "cmake")))
2549 (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
2550 (delete 'configure))))
2551 (home-page "https://github.com/Heeks/libarea")
2553 "Library and python module for pocketing and profiling operations")
2555 "Area is a CAM-related software for pocketing operation.
2557 This project provides library and associated python-module to compute pocket
2563 (define-public libspnav
2570 (url "https://github.com/FreeSpacenav/libspnav")
2571 (commit (string-append "libspnav-" version))))
2574 "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba"))
2575 (file-name (git-file-name name version))))
2576 (build-system gnu-build-system)
2578 `(("libx11" ,libx11)))
2579 (arguments `(#:tests? #f))
2580 (home-page "http://spacenav.sourceforge.net/")
2582 "Library for communicating with spacenavd or 3dxsrv")
2584 "The libspnav library is provided as a replacement of the magellan
2585 library. It provides a cleaner, and more orthogonal interface. libspnav
2586 supports both the original X11 protocol for communicating with the driver, and
2587 the new alternative non-X protocol. Programs that choose to use the X11
2588 protocol, are automatically compatible with either the free spacenavd driver
2589 or the official 3dxserv, as if they were using the magellan SDK.
2591 Also, libspnav provides a magellan API wrapper on top of the new API. So, any
2592 applications that were using the magellan library, can switch to libspnav
2593 without any changes. And programmers that are familiar with the magellan API
2594 can continue using it with a free library without the restrictions of the
2596 (license license:bsd-3)))
2598 (define-public openctm
2599 (let ((revision 603))
2600 ;; Previous versions don't compile, they need to link libGL and libGLU.
2601 ;; Fixed in this revision.
2604 (version (string-append "1.0.3." (number->string revision)))
2609 (url "https://svn.code.sf.net/p/openctm/code/trunk")
2610 (revision revision)))
2611 (file-name (string-append name "-" version "-checkout"))
2613 (base32 "01wb70m48xh5gwhv60a5brv4sxl0i0rh038w32cgnlxn5x86s9f1"))))
2614 (build-system gnu-build-system)
2616 `(("pkg-config" ,pkg-config)))
2623 `(#:tests? #f ;no tests
2625 (modify-phases %standard-phases
2627 (lambda* (#:key outputs #:allow-other-keys)
2628 (rename-file "Makefile.linux" "Makefile")
2629 (let ((out (assoc-ref outputs "out")))
2630 ;; Create output directories.
2631 (mkdir-p (string-append out "/lib"))
2632 (mkdir-p (string-append out "/include"))
2633 (mkdir-p (string-append out "/bin"))
2635 (substitute* "tools/Makefile.linux"
2637 (string-append "-rpath," out "/lib/"))
2640 ;; Set right output.
2641 (substitute* "Makefile"
2643 (string-append out "/lib"))
2647 (synopsis "3D triangle mesh format and related tools and libraries")
2648 (description "OpenCTM is a file format, a software library and a tool set
2649 for compression of 3D triangle meshes. The geometry is compressed to a
2650 fraction of comparable file formats (3DS, STL, COLLADA...), and the format is
2651 accessible through a simple API")
2652 (license license:zlib)
2653 (home-page "http://openctm.sourceforge.net/"))))
2655 (define-public lib3ds
2663 "https://storage.googleapis.com/google-code-archive-downloads"
2664 "/v2/code.google.com/lib3ds/lib3ds-" version ".zip"))
2666 (base32 "1qr9arfdkjf7q11xhvxwzmhxqz3nhcjkyb8zzfjpz9jm54q0rc7m"))))
2667 (build-system gnu-build-system)
2669 `(("unzip" ,unzip)))
2670 (home-page "https://code.google.com/archive/p/lib3ds")
2671 (synopsis "3DS format file toolkit")
2672 (description "Lib3ds is a toolkit for handling the 3DS format for 3D
2673 model files. Its main goal is to simplify the creation of 3DS import and
2675 (license license:lgpl2.1+)))
2677 (define-public meshlab
2684 (url "https://github.com/cnr-isti-vclab/meshlab")
2685 (commit (string-append "Meshlab-" version))
2687 (file-name (git-file-name name version))
2689 (base32 "1cgx24wxh2ah5pff51rcrk6x8qcdjpkxcdak7s4cfzmxvjlshydd"))))
2690 (build-system cmake-build-system)
2692 `(("qtbase" ,qtbase)
2693 ("qtscript" ,qtscript)
2694 ("qtxmlpatterns" ,qtxmlpatterns)
2698 ("muparser" ,muparser)
2701 ("libfreenect" ,libfreenect)
2703 ("openctm" ,openctm)
2704 ;; FIXME: Compilation fails with system qhull:
2705 ;; https://github.com/cnr-isti-vclab/meshlab/issues/678
2709 `(#:tests? #f ; Has no tests
2711 (modify-phases %standard-phases
2712 (add-after 'unpack 'go-to-source-dir
2713 (lambda _ (chdir "src") #t))
2714 (add-after 'install 'move-files
2715 (lambda* (#:key outputs #:allow-other-keys)
2716 (let ((lib (string-append (assoc-ref outputs "out")
2719 (string-append lib "/meshlab/libmeshlab-common.so")
2720 (string-append lib "/libmeshlab-common.so"))
2722 (synopsis "3D triangular mesh processing and editing software")
2723 (home-page "https://www.meshlab.net/")
2724 (description "MeshLab is a system for the processing and
2725 editing of unstructured large 3D triangular meshes. It is aimed to help the
2726 processing of the typical not-so-small unstructured models arising in 3D
2727 scanning, providing a set of tools for editing, cleaning, healing, inspecting,
2728 rendering and converting this kind of meshes. These tools include MeshLab
2729 proper, a versatile program with a graphical user interface, and meshlabserver,
2730 a program that can perform mesh processing tasks in batch mode, without a
2732 (license license:gpl3+)))
2740 (uri (string-append "mirror://gnu/poke/poke-" version
2744 "0qnz7lc681nxa16rw9n9q4spy9fas6m2adrpb49imh34bgdgh77n"))))
2745 (build-system gnu-build-system)
2746 ;; The GUI, which we elide, requires tcl and tk.
2747 (native-inputs `(;; Requires bison 3.6+ but we currently only have 3.5.
2748 ;; Bison 3.6 will be available in the next core update.
2749 ("bison-3.6" ,bison-3.6)
2751 ("dejagnu" ,dejagnu)
2753 ("libtool" ,libtool)
2755 ("pkg-config" ,pkg-config)
2756 ("python-2" ,python-2)
2757 ("python-3" ,python-3)))
2758 ;; FIXME: Enable NBD support by adding `libnbd' (currently unpackaged).
2759 (inputs `(("json-c" ,json-c)
2761 ("readline" ,readline)
2762 ("libtextstyle" ,libtextstyle)))
2764 ;; To build the GUI, add the `--enable-gui' configure flag.
2765 ;; To enable the "hyperlink server", add the `--enable-hserver' flag.
2766 `(#:configure-flags '("--enable-mi")))
2767 (home-page "http://jemarch.net/poke.html")
2768 (synopsis "Interactive, extensible editor for binary data")
2769 (description "GNU poke is an interactive, extensible editor for binary
2770 data. Not limited to editing basic entities such as bits and bytes, it
2771 provides a full-fledged procedural, interactive programming language designed
2772 to describe data structures and to operate on them.")
2773 (license license:gpl3+)))
2775 (define-public pcb2gcode
2783 (url "https://github.com/pcb2gcode/pcb2gcode")
2784 (commit (string-append "v" version))
2786 (file-name (git-file-name name version))
2789 "0nzglcyh6ban27cc73j4l7w7r9k38qivq0jz8iwnci02pfalw4ry"))))
2790 (build-system gnu-build-system)
2797 ("librsvg" ,librsvg)))
2799 `(("autoconf" ,autoconf)
2800 ("automake" ,automake)
2801 ("libtool" ,libtool)
2802 ("pkg-config" ,pkg-config)))
2803 (home-page "https://github.com/pcb2gcode/pcb2gcode")
2804 (synopsis "Generate G-code for milling PCBs")
2805 (description "pcb2gcode is a command-line program for isolation routing
2806 and drilling of PCBs. It takes Gerber files as input and outputs G-code files
2807 for the milling of PCBs. It also includes an autoleveller for the automatic
2808 dynamic calibration of the milling depth.")
2809 (license license:gpl3+)))
2811 (define-public syscall-intercept
2812 ;; Upstream provides no tag. Also, last version update is 4 years old.
2813 (let ((commit "304404581c57d43478438d175099d20260bae74e")
2816 (name "syscall-intercept")
2817 (version (git-version "0.1.0" revision commit))
2823 (url "https://github.com/pmem/syscall_intercept/")
2825 (file-name (git-file-name name version))
2827 (base32 "17sw78xp5wjzv25adpbq3khl8fi0avj7bgpi57q3jnvl3c68xy5z"))))
2830 ("pkg-config" ,pkg-config)))
2832 `(("capstone" ,capstone)))
2833 (build-system cmake-build-system)
2835 `(#:build-type "Release"
2836 ;; FIXME: "syscall_format_logging" test fails.
2838 (home-page "https://github.com/pmem/syscall_intercept")
2839 (synopsis "System call intercepting library")
2841 "The system call intercepting library provides a low-level interface
2842 for hooking Linux system calls in user space. This is achieved by
2843 hot-patching the machine code of the standard C library in the memory of
2845 (license license:bsd-2))))