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>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages engineering)
39 #:use-module (guix packages)
40 #:use-module (guix download)
41 #:use-module (guix gexp)
42 #:use-module (guix git-download)
43 #:use-module (guix svn-download)
44 #:use-module (guix monads)
45 #:use-module (guix store)
46 #:use-module (guix utils)
47 #:use-module ((srfi srfi-1) #:hide (zip))
48 #:use-module ((guix licenses) #:prefix license:)
49 #:use-module (guix build-system ant)
50 #:use-module (guix build-system cmake)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system python)
53 #:use-module (guix build-system qt)
54 #:use-module (gnu packages)
55 #:use-module (gnu packages algebra)
56 #:use-module (gnu packages autotools)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages bdw-gc)
59 #:use-module (gnu packages bison)
60 #:use-module (gnu packages boost)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages cmake)
63 #:use-module (gnu packages commencement)
64 #:use-module (gnu packages compression)
65 #:use-module (gnu packages curl)
66 #:use-module (gnu packages dejagnu)
67 #:use-module (gnu packages digest)
68 #:use-module (gnu packages documentation)
69 #:use-module (gnu packages flex)
70 #:use-module (gnu packages fontutils)
71 #:use-module (gnu packages fpga)
72 #:use-module (gnu packages freedesktop)
73 #:use-module (gnu packages gcc)
74 #:use-module (gnu packages gd)
75 #:use-module (gnu packages gettext)
76 #:use-module (gnu packages ghostscript)
77 #:use-module (gnu packages gl)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages gnome)
80 #:use-module (gnu packages gperf)
81 #:use-module (gnu packages graphics)
82 #:use-module (gnu packages graphviz)
83 #:use-module (gnu packages groff)
84 #:use-module (gnu packages gtk)
85 #:use-module (gnu packages guile)
86 #:use-module (gnu packages image)
87 #:use-module (gnu packages image-processing)
88 #:use-module (gnu packages imagemagick)
89 #:use-module (gnu packages libevent)
90 #:use-module (gnu packages linux) ;FIXME: for pcb
91 #:use-module (gnu packages lisp)
92 #:use-module (gnu packages m4)
93 #:use-module (gnu packages maths)
94 #:use-module (gnu packages man)
95 #:use-module (gnu packages multiprecision)
96 #:use-module (gnu packages mpi)
97 #:use-module (gnu packages ncurses)
98 #:use-module (gnu packages perl)
99 #:use-module (gnu packages pkg-config)
100 #:use-module (gnu packages python)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages qt)
103 #:use-module (gnu packages readline)
104 #:use-module (gnu packages swig)
105 #:use-module (gnu packages tbb)
106 #:use-module (gnu packages tcl)
107 #:use-module (gnu packages texinfo)
108 #:use-module (gnu packages tls)
109 #:use-module (gnu packages tex)
110 #:use-module (gnu packages version-control)
111 #:use-module (gnu packages web)
112 #:use-module (gnu packages wxwidgets)
113 #:use-module (gnu packages xml)
114 #:use-module (gnu packages openkinect)
115 #:use-module (gnu packages xorg))
117 (define-public librecad
124 "https://github.com/LibreCAD/LibreCAD/archive/"
126 (file-name (string-append name "-" version ".tar.gz"))
129 "01nvc1g3si05r5np1pzn62ah9w84p8nxa32wqrjh6gdi17jfvi3l"))))
130 (build-system gnu-build-system)
133 (modify-phases %standard-phases
134 ;; Without this patch boost complains that "make_array" is not a
135 ;; member of "boost::serialization".
136 (add-after 'unpack 'patch-boost-error
138 (substitute* "librecad/src/lib/math/lc_quadratic.h"
139 (("#include \"rs_vector.h\"" line)
141 "\n#include <boost/serialization/array_wrapper.hpp>")))
142 (substitute* "librecad/src/lib/math/rs_math.cpp"
143 (("#include <boost/numeric/ublas/matrix.hpp>" line)
144 (string-append "#include <boost/serialization/array_wrapper.hpp>\n"
147 ;; Fix build against Qt 5.11.
148 (add-after 'unpack 'add-missing-headers
150 (substitute* "librecad/src/ui/generic/widgetcreator.cpp"
151 (("#include <QPushButton>") "#include <QPushButton>
152 #include <QActionGroup>"))
154 (add-after 'unpack 'patch-paths
155 (lambda* (#:key outputs #:allow-other-keys)
156 (let ((out (assoc-ref outputs "out")))
157 (substitute* "librecad/src/lib/engine/rs_system.cpp"
158 (("/usr/share") (string-append out "/share"))))))
160 (lambda* (#:key inputs #:allow-other-keys)
161 (system* "qmake" (string-append "BOOST_DIR="
162 (assoc-ref inputs "boost")))))
164 (lambda* (#:key outputs #:allow-other-keys)
165 (let* ((out (assoc-ref outputs "out"))
166 (bin (string-append out "/bin"))
167 (share (string-append out "/share/librecad")))
169 (install-file "unix/librecad" bin)
171 (copy-recursively "unix/resources" share))
173 ;; Ensure that icons are found at runtime
174 (add-after 'install 'wrap-executable
175 (lambda* (#:key inputs outputs #:allow-other-keys)
176 (let* ((out (assoc-ref outputs "out"))
177 (qt '("qtbase" "qtsvg")))
178 (wrap-program (string-append out "/bin/librecad")
179 `("QT_PLUGIN_PATH" ":" prefix
180 ,(map (lambda (label)
181 (string-append (assoc-ref inputs label)
182 "/lib/qt5/plugins/"))
187 ("muparser" ,muparser)
188 ("freetype" ,freetype)
192 `(("pkg-config" ,pkg-config)
194 (home-page "https://librecad.org/")
195 (synopsis "Computer-aided design (CAD) application")
197 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
199 (license license:gpl2)))
201 (define-public geda-gaf
208 "http://ftp.geda-project.org/geda-gaf/stable/v"
209 (version-major+minor version) "/"
210 version "/geda-gaf-" version ".tar.gz"))
213 "06ivgarvwbzjz2wigxzzkm8iszldi2p6x3a6jnlczjyrz4csddsy"))))
214 (build-system gnu-build-system)
217 (modify-phases %standard-phases
218 ;; tests require a writable HOME
219 (add-before 'check 'set-home
221 (setenv "HOME" (getenv "TMPDIR"))
223 (add-after 'unpack 'disable-failing-tests
225 (substitute* "xorn/tests/Makefile.in"
227 ;; This test returns its correct result in an unexpected order.
228 (substitute* "libgeda/scheme/unit-tests/t0402-config.scm"
229 (("\\(begin-config-test 'config-keys" m)
230 (string-append "#;" m)))
233 (let ((pcb (assoc-ref %build-inputs "pcb")))
234 (list (string-append "--with-pcb-datadir=" pcb "/share")
235 (string-append "--with-pcb-lib-path="
236 pcb "/share/pcb/pcblib-newlib:"
237 pcb "/share/pcb/newlib")))))
243 ("shared-mime-info" ,shared-mime-info)
246 ("python" ,python-2))) ; for xorn
248 `(("pkg-config" ,pkg-config)
249 ("desktop-file-utils" ,desktop-file-utils)
250 ("perl" ,perl))) ; for tests
251 (home-page "http://geda-project.org/")
252 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
254 "Gaf stands for “gschem and friends”. It is a subset of the entire tool
255 suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
256 which currently includes: gschem, a schematic capture program; gnetlist, a
257 netlist generation program; gsymcheck, a syntax checker for schematic symbols;
258 gattrib, a spreadsheet programm that manipulates the properties of symbols of
259 a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
260 tool to forward annotation from your schematic to layout using PCB; some minor
262 (license license:gpl2+)))
264 (define-public lepton-eda
265 ;; This is a fork of gEDA/gaf started in late 2016. One of its goal is to
266 ;; keep and to extend Guile support.
270 (version "1.9.9-20191003")
271 (home-page "https://github.com/lepton-eda/lepton-eda")
274 (uri (git-reference (url home-page) (commit version)))
277 "08cc3zfk84qq9mrkc9pp4r9jlavvm01wwy0yd9frql68w2zw6mip"))
278 (file-name (git-file-name name version))))
280 `(("autoconf" ,autoconf)
281 ("automake" ,automake)
282 ("desktop-file-utils" ,desktop-file-utils)
284 ("gettext" ,gettext-minimal)
288 ,@(package-native-inputs geda-gaf)))
293 ("shared-mime-info" ,shared-mime-info)
297 (substitute-keyword-arguments (package-arguments geda-gaf)
298 ((#:configure-flags flags ''())
299 ;; When running "make", the POT files are built with the build time as
300 ;; their "POT-Creation-Date". Later on, "make" notices that .pot
301 ;; files were updated and goes on to run "msgmerge"; as a result, the
302 ;; non-deterministic POT-Creation-Date finds its way into .po files,
303 ;; and then in .gmo files. To avoid that, simply make sure 'msgmerge'
304 ;; never runs. See <https://bugs.debian.org/792687>.
305 `(cons "ac_cv_path_MSGMERGE=true" ,flags))
306 ((#:phases phases '%standard-phases)
307 `(modify-phases %standard-phases
308 (add-before 'bootstrap 'prepare
310 ;; Some of the scripts there are invoked by autogen.sh.
311 (for-each patch-shebang (find-files "build-tools"))
313 ;; Make sure 'msgmerge' can modify the PO files.
314 (for-each (lambda (po)
316 (find-files "." "\\.po$"))
318 ;; This would normally be created by invoking 'git', but it
319 ;; doesn't work here.
320 (call-with-output-file "version.h"
322 (format port "#define PACKAGE_DATE_VERSION \"~a\"~%"
323 ,(string-drop version
324 (+ 1 (string-index version #\-))))
325 (format port "#define PACKAGE_DOTTED_VERSION \"~a\"~%"
326 ,(string-take version
327 (string-index version #\-)))
328 (format port "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%")))
330 (add-after 'install 'compile-scheme-files
331 (lambda* (#:key outputs #:allow-other-keys)
332 (invoke "make" "precompile")
333 (for-each (lambda (program)
334 (wrap-program program
335 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
336 (,(string-append (assoc-ref outputs "out")
337 "/share/lepton-eda/ccache/")))))
338 (find-files (string-append (assoc-ref outputs "out") "/bin")
342 "Lepton EDA ia an @dfn{electronic design automation} (EDA) tool set
343 forked from gEDA/gaf in late 2016. EDA tools are used for electrical circuit
344 design, schematic capture, simulation, prototyping, and production. Lepton
345 EDA includes tools for schematic capture, attribute management, bill of
346 materials (BOM) generation, netlisting into over 20 netlist formats, analog
347 and digital simulation, and printed circuit board (PCB) layout, and many other
356 (uri (string-append "mirror://sourceforge/pcb/pcb/pcb-" version
357 "/pcb-" version ".tar.gz"))
360 "1a7rilp75faidny0r4fdwdxkflyrqp6svxv9lbg7h868293962iz"))))
361 (build-system gnu-build-system)
364 (modify-phases %standard-phases
365 (add-after 'unpack 'use-wish8.6
367 (substitute* "configure"
368 (("wish85") "wish8.6"))
370 ;; It checks for "xhost", which we don't have. This shouldn't
371 ;; matter, because the test is supposed to be skipped, but it causes
372 ;; "run_tests.sh" (and thus the "check" phase) to fail.
373 (add-after 'unpack 'fix-check-for-display
375 (substitute* "tests/run_tests.sh"
376 (("have_display=no") "have_display=yes"))
378 (add-after 'install 'wrap
379 (lambda* (#:key inputs outputs #:allow-other-keys)
380 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
381 ;; fix of the mesa package we wrap the pcb executable such that
382 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
383 (let* ((out (assoc-ref outputs "out"))
384 (path (string-append (assoc-ref inputs "udev") "/lib")))
385 (wrap-program (string-append out "/bin/pcb")
386 `("LD_LIBRARY_PATH" ":" prefix (,path))))
388 (add-before 'check 'pre-check
391 (setenv "DISPLAY" ":1")
396 ("udev" ,eudev) ;FIXME: required by mesa
400 ("gtkglext" ,gtkglext)
401 ("shared-mime-info" ,shared-mime-info)
404 `(("pkg-config" ,pkg-config)
405 ("intltool" ,intltool)
407 ("desktop-file-utils" ,desktop-file-utils)
410 ("imagemagick" ,imagemagick)
412 ("ghostscript" ,ghostscript)
413 ("xvfb" ,xorg-server-for-tests)))
414 (home-page "http://pcb.geda-project.org/")
415 (synopsis "Design printed circuit board layouts")
417 "GNU PCB is an interactive tool for editing printed circuit board
418 layouts. It features a rats-nest implementation, schematic/netlist import,
419 and design rule checking. It also includes an autorouter and a trace
420 optimizer; and it can produce photorealistic and design review images.")
421 (license license:gpl2+)))
423 (define-public pcb-rnd
424 (package (inherit pcb)
429 (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/"
430 "pcb-rnd-" version ".tar.gz"))
433 "0pycynla60b96jkb6fh6f4sx663pqbzjwnixhw5ym8sym2absm09"))))
435 `(#:tests? #f ; no check target
437 (modify-phases %standard-phases
438 (add-after 'unpack 'cc-is-gcc
439 (lambda _ (setenv "CC" "gcc") #t))
441 ;; The configure script doesn't tolerate most of our configure flags.
442 (lambda* (#:key outputs #:allow-other-keys)
443 (invoke "sh" "configure"
444 (string-append "--prefix="
445 (assoc-ref outputs "out"))))))))
446 (home-page "http://repo.hu/projects/pcb-rnd/")
447 (description "PCB RND is a fork of the GNU PCB circuit board editing tool
448 featuring various improvements and bug fixes.")))
450 (define-public fastcap
453 (version "2.0-18Sep92")
455 (method url-fetch/tarbomb)
456 (uri (string-append "http://www.rle.mit.edu/cpg/codes/"
457 name "-" version ".tgz"))
460 "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k"))
462 ;; Remove a non-free file.
464 (delete-file "doc/psfig.sty")
466 (patches (search-patches "fastcap-mulSetup.patch"
467 "fastcap-mulGlobal.patch"))))
468 (build-system gnu-build-system)
470 ;; FIXME: with texlive-tiny citation references are rendered as question
471 ;; marks. During the build warnings like these are printed:
472 ;; LaTeX Warning: Citation `nabors91' on page 2 undefined on input line 3.
473 `(("texlive" ,(texlive-union (list texlive-fonts-amsfonts)))
474 ("ghostscript" ,ghostscript)))
476 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
478 #:tests? #f ;; no tests-suite
479 #:modules ((srfi srfi-1)
480 ,@%gnu-build-system-modules)
482 (modify-phases %standard-phases
483 (add-after 'build 'make-doc
485 (invoke "make" "CC=gcc" "RM=rm" "SHELL=sh" "manual")))
486 (add-before 'make-doc 'fix-doc
488 (substitute* "doc/Makefile" (("/bin/rm") (which "rm")))
489 (substitute* (find-files "doc" "\\.tex")
490 (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}"
492 (string-append "\\includegraphics[scale=" scale "]{"
494 (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}"
496 (string-append "\\includegraphics[width=" width "]{"
498 (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}"
500 (string-append "\\includegraphics[height=" height "]{"
502 (("\\\\psfig\\{figure=([^,]*)\\}" all file)
503 (string-append "\\includegraphics{" file "}")))
504 (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex")
505 (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}"
507 (string-append "\\documentclass[" options "]{"
509 "\\usepackage{graphicx}\n"
510 "\\usepackage{robinspace}"))
511 (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all)
512 (string-append "%" all))
513 (("\\\\setstretch\\{.*\\}" all)
514 (string-append "%" all)))
517 (add-before 'install 'clean-bin
519 (delete-file (string-append (getcwd) "/bin/README"))
521 (add-before 'install 'make-pdf
523 (setenv "HOME" "/tmp") ; FIXME: for texlive font cache
524 (with-directory-excursion "doc"
526 (for-each (lambda (file)
527 (invoke "dvips" file "-o"))
528 (find-files "." "\\.dvi"))
529 (for-each (lambda (file)
530 (invoke "ps2pdf" file))
531 '("mtt.ps" "ug.ps" "tcad.ps"))
532 (invoke "make" "clean")))))
534 (lambda* (#:key outputs #:allow-other-keys)
535 (let* ((out (assoc-ref outputs "out"))
536 (data (string-append out "/share"))
537 (bin (string-append out "/bin"))
538 (doc (string-append data "/doc/" ,name "-" ,version))
539 (examples (string-append doc "/examples")))
540 (with-directory-excursion "bin"
541 (for-each (lambda (f)
542 (install-file f bin))
543 (find-files "." ".*")))
544 (copy-recursively "doc" doc)
545 (copy-recursively "examples" examples)
547 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
548 (synopsis "Multipole-accelerated capacitance extraction program")
550 "Fastcap is a capacitance extraction program based on a
551 multipole-accelerated algorithm.")
552 (license (license:non-copyleft #f "See fastcap.c."))))
554 (define-public fasthenry
557 (version "3.0-12Nov96")
560 (file-name (string-append name "-" version ".tar.gz"))
562 "http://www.rle.mit.edu/cpg/codes/" name
563 "-" version ".tar.z"))
565 (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
566 (patches (search-patches "fasthenry-spAllocate.patch"
567 "fasthenry-spBuild.patch"
568 "fasthenry-spUtils.patch"
569 "fasthenry-spSolve.patch"
570 "fasthenry-spFactor.patch"))))
571 (build-system gnu-build-system)
573 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
575 #:tests? #f ;; no tests-suite
576 #:modules ((srfi srfi-1)
577 ,@%gnu-build-system-modules)
579 (modify-phases %standard-phases
582 (lambda* (#:key outputs #:allow-other-keys)
583 (let* ((out (assoc-ref outputs "out"))
584 (data (string-append out "/share"))
585 (bin (string-append out "/bin"))
586 (doc (string-append data "/doc/" ,name "-" ,version))
587 (examples (string-append doc "/examples")))
588 (with-directory-excursion "bin"
589 (for-each (lambda (f)
590 (install-file f bin))
591 (find-files "." ".*")))
592 (copy-recursively "doc" doc)
593 (copy-recursively "examples" examples)
595 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
596 (synopsis "Multipole-accelerated inductance analysis program")
598 "Fasthenry is an inductance extraction program based on a
599 multipole-accelerated algorithm.")
600 (license (license:non-copyleft #f "See induct.c."))))
602 (define-public fritzing
609 (url "https://github.com/fritzing/fritzing-app.git")
611 (file-name (git-file-name name version))
614 "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
615 (build-system gnu-build-system)
618 (modify-phases %standard-phases
620 (lambda* (#:key inputs outputs #:allow-other-keys)
621 (copy-recursively (assoc-ref inputs "fritzing-parts-db")
623 ;; Make compatible with libgit2 > 0.24
624 (substitute* "src/version/partschecker.cpp"
625 (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
626 "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
628 ;; Use system libgit2 and boost.
629 (substitute* "phoenix.pro"
630 (("^LIBGIT2INCLUDE =.*")
631 (string-append "LIBGIT2INCLUDE="
632 (assoc-ref inputs "libgit2") "/include\n"))
633 (("^ LIBGIT2LIB =.*")
634 (string-append " LIBGIT2LIB="
635 (assoc-ref inputs "libgit2") "/lib\n")))
636 ;; This file checks for old versions of Boost, insisting on
637 ;; having us download the boost sources and placing them in the
639 (substitute* "pri/utils.pri"
640 (("error\\(") "message("))
642 (let ((out (assoc-ref outputs "out")))
644 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib")
645 (string-append "PREFIX=" out)
649 ("qtserialport" ,qtserialport)
658 (url "https://github.com/fritzing/fritzing-parts.git")
660 (file-name (git-file-name "fritzing-parts" version))
663 "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
664 (home-page "https://fritzing.org")
665 (synopsis "Electronic circuit design")
667 "The Fritzing application is @dfn{Electronic Design Automation} (EDA)
668 software with a low entry barrier, suited for the needs of makers and
669 hobbyists. It offers a unique real-life \"breadboard\" view, and a parts
670 library with many commonly used high-level components. Fritzing makes it very
671 easy to communicate about circuits, as well as to turn them into PCB layouts
672 ready for production.")
673 ;; Documentation and parts are released under CC-BY-SA 3.0; source code is
674 ;; released under GPLv3+.
675 (license (list license:gpl3+ license:cc-by-sa3.0))))
683 (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-"
684 version "/gerbv-" version ".tar.gz"))
687 "1d2k43k7i4yvbpi4sw1263a8d0q98z2n7aqhmpinpkih8a681vn5"))))
688 (build-system gnu-build-system)
690 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
691 ("desktop-file-utils" ,desktop-file-utils)
692 ("pkg-config" ,pkg-config)))
696 (home-page "http://gerbv.geda-project.org/")
697 (synopsis "Gerber file viewer")
699 "Gerbv is a viewer for files in the Gerber format (RS-274X only), which
700 is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets
701 you load several files on top of each other, do measurements on the displayed
702 image, etc. Besides viewing Gerbers, you may also view Excellon drill files
703 as well as pick-place files.")
704 (license license:gpl2+)))
706 (define-public translate2geda
707 ;; There has been no formal release yet.
708 (let ((commit "4c19e7eefa338cea8f1ee999ea8b37f8d0698169")
711 (name "translate2geda")
712 (version (git-version "0" revision commit))
716 (url "https://github.com/erichVK5/translate2geda.git")
718 (file-name (git-file-name name version))
721 "1h062bbpw8nk0jamkya1k4lsgaia796jyviiz2gkdi6k1bxhwgpa"))))
722 (build-system ant-build-system)
724 `(#:tests? #f ; there are no tests
725 #:jar-name "translate2geda.jar"
727 #:main-class "translate2geda"
729 (modify-phases %standard-phases
730 (add-after 'install 'install-bin
731 (lambda* (#:key inputs outputs #:allow-other-keys)
732 (let* ((out (assoc-ref outputs "out"))
733 (bin (string-append out "/bin"))
734 (wrapper (string-append bin "/translate2geda")))
736 (with-output-to-file wrapper
738 (format #t "#!/bin/sh~%exec ~a -jar ~a/share/java/translate2geda.jar"
739 (which "java") out)))
740 (chmod wrapper #o555))
742 (home-page "https://github.com/erichVK5/translate2geda")
743 (synopsis "Utility for converting symbol and footprint formats to gEDA")
745 "This package provides a utility for converting Kicad (@file{.mod},
746 @file{.lib}), Eagle (@file{.lbr}), gerber (@file{.gbr}, etc..),
747 BXL (@file{.bxl}), IBIS (@file{.ibs}), symdef, LT-Spice (@file{.asc}),
748 QUCS (@file{.sch}), and BSDL (@file{.bsd}) symbols and footprints and EggBot
750 (license license:gpl2+))))
752 (define-public libfive
753 (let ((commit "6e39254e57c179459bb929df49ae96a6017a0ed6")
757 (version (git-version "0" revision commit))
761 (url "https://github.com/libfive/libfive")
765 "0ryv2hcbrwqc087w7rrs4a2irkcpmqync00g4dh8n7jn10w2jkim"))
766 (file-name (git-file-name name version))
768 ;; Remove bundled catch since we provide our own.
770 (delete-file "libfive/test/catch.hpp")
772 (build-system cmake-build-system)
774 `(#:test-target "libfive-test"
776 (modify-phases %standard-phases
777 (add-after 'unpack 'remove-native-compilation
779 (substitute* "CMakeLists.txt" (("-march=native") ""))
781 (add-after 'unpack 'find-catch
782 (lambda* (#:key inputs #:allow-other-keys)
783 (setenv "CPLUS_INCLUDE_PATH"
784 (string-append (assoc-ref inputs "catch")
786 (or (getenv "CPLUS_INCLUDE_PATH") "")))
789 `(("pkg-config" ,pkg-config)))
792 ("catch" ,catch-framework2)
796 ("guile" ,guile-2.2)))
797 (home-page "https://libfive.com")
798 (synopsis "Tool for programmatic computer-aided design")
800 "Libfive is a tool for programmatic computer-aided design (CAD). In
801 libfive, solid models are defined as Scheme scripts, and there are no opaque
802 function calls into the geometry kernel: everything is visible to the user.
803 Even fundamental, primitive shapes are represented as code in the user-level
805 (license (list license:mpl2.0 ;library
806 license:gpl2+))))) ;Guile bindings and GUI
808 ;; TODO Add doc https://gitlab.com/kicad/services/kicad-doc/-/tree/master
817 (url "https://gitlab.com/kicad/code/kicad.git")
820 (base32 "1pa3z0h0679jmgxlzc833h6q85b5paxdp69kf2h93vkaryj58622"))
821 (file-name (git-file-name name version))))
822 (build-system cmake-build-system)
824 `(#:out-of-source? #t
825 #:tests? #f ; no tests
826 #:build-type "Release"
828 (list "-DKICAD_SCRIPTING_PYTHON3=ON"
829 "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON"
830 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE")
832 (modify-phases %standard-phases
833 (add-after 'install 'install-translations
834 (lambda* (#:key inputs outputs #:allow-other-keys)
835 (copy-recursively (assoc-ref inputs "kicad-i18n")
836 (assoc-ref outputs "out"))
838 (add-after 'install 'wrap-program
839 ;; Ensure correct Python at runtime.
840 (lambda* (#:key inputs outputs #:allow-other-keys)
841 (let* ((out (assoc-ref outputs "out"))
842 (python (assoc-ref inputs "python"))
843 (file (string-append out "/bin/kicad"))
847 ,(version-major+minor
848 (package-version python))
850 (getenv "PYTHONPATH"))))
852 `("PYTHONPATH" ":" prefix (,path))
854 (,(string-append python "/bin:")))))
857 (list (search-path-specification
858 (variable "KICAD_TEMPLATE_DIR")
859 (files '("share/kicad/template")))
860 (search-path-specification
861 (variable "KICAD_SYMBOL_DIR") ; symbol path
862 (files '("share/kicad/library")))
863 (search-path-specification
864 (variable "KISYSMOD") ; footprint path
865 (files '("share/kicad/modules")))
866 (search-path-specification
867 (variable "KISYS3DMOD") ; 3D model path
868 (files '("share/kicad/modules/packages3d")))))
871 ("desktop-file-utils" ,desktop-file-utils)
872 ("gettext" ,gettext-minimal)
873 ("kicad-i18n" ,kicad-i18n)
874 ("pkg-config" ,pkg-config)
882 ("hicolor-icon-theme" ,hicolor-icon-theme)
883 ("libngspice" ,libngspice)
886 ("opencascade-oce" ,opencascade-oce)
888 ("python" ,python-wrapper)
889 ("wxwidgets" ,wxwidgets)
890 ("wxpython" ,python-wxpython)))
891 (home-page "https://kicad-pcb.org/")
892 (synopsis "Electronics Design Automation Suite")
893 (description "Kicad is a program for the formation of printed circuit
894 boards and electrical circuits. The software has a number of programs that
895 perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing
896 electrical diagrams), gerbview (viewing Gerber files) and others.")
897 (license license:gpl3+)))
902 (version (package-version kicad))
906 (url "https://gitlab.com/kicad/code/kicad-i18n.git")
908 (file-name (git-file-name name version))
911 "0qryi8xjm23ka363zfl7bbga0v5c31fr3d4nyxp3m168vkv9zhha"))))
912 (build-system cmake-build-system)
915 (modify-phases %standard-phases
919 `(("gettext" ,gettext-minimal)))
920 (home-page (package-home-page kicad))
921 (synopsis "KiCad GUI translations")
922 (description "This package contains the po files that are used for the GUI
923 translations for KiCad.")
924 (license license:gpl3+)))
926 (define-public kicad-i18l
927 (deprecated-package "kicad-i18l" kicad-i18n))
929 (define-public kicad-symbols
931 (name "kicad-symbols")
932 (version (package-version kicad))
936 (url "https://github.com/KiCad/kicad-symbols.git")
938 (file-name (git-file-name name version))
941 "12w3rdy085drlikkpb27n9ni7cyg9l0pqy7hnr86cxjcw3l5wcx6"))))
942 (build-system cmake-build-system)
944 `(#:tests? #f)) ; no tests exist
945 (home-page (package-home-page kicad))
946 (synopsis "Official KiCad schematic symbol libraries")
947 (description "This package contains the official KiCad schematic symbol
949 ;; TODO: Exception: "To the extent that the creation of electronic designs
950 ;; that use 'Licensed Material' can be considered to be 'Adapted Material',
951 ;; then the copyright holder waives article 3 of the license with respect to
952 ;; these designs and any generated files which use data provided as part of
953 ;; the 'Licensed Material'."
954 ;; See <https://github.com/KiCad/kicad-symbols/blob/master/LICENSE.md>.
955 (license license:cc-by-sa4.0)))
957 (define-public kicad-footprints
959 (inherit kicad-symbols)
960 (name "kicad-footprints")
961 (version (package-version kicad))
965 (url "https://github.com/KiCad/kicad-footprints.git")
967 (file-name (git-file-name name version))
970 "1kmf91a5mmvj9izrv40mkaw1w36yjgn8daczd9rq2wlmd0rdp1zx"))))
971 (synopsis "Official KiCad footprint libraries")
972 (description "This package contains the official KiCad footprint libraries.")))
974 (define-public kicad-packages3d
976 (inherit kicad-symbols)
977 (name "kicad-packages3d")
978 (version (package-version kicad))
982 (url "https://github.com/KiCad/kicad-packages3d.git")
984 (file-name (git-file-name name version))
987 "0b9jglf77fy0n0r8xs4yqkv6zvipyfvp0z5dnqlzp32csy5aqpi1"))))
988 (synopsis "Official KiCad 3D model libraries")
989 (description "This package contains the official KiCad 3D model libraries.")))
991 (define-public kicad-templates
993 (inherit kicad-symbols)
994 (name "kicad-templates")
995 (version (package-version kicad))
999 (url "https://github.com/KiCad/kicad-templates.git")
1001 (file-name (git-file-name name version))
1004 "1hppcsrkn4dk6ggby6ckh0q65qxkywrbyxa4lwpaf7pxjyv498xg"))))
1005 (synopsis "Official KiCad project and worksheet templates")
1006 (description "This package contains the official KiCad project and
1007 worksheet templates.")))
1009 (define-public linsmith
1016 "mirror://sourceforge/linsmith/linsmith/linsmith-"
1017 version "/linsmith-" version ".tar.gz"))
1020 "13qj7n9826qc9shkkgd1p6vcpj78v4h9d67wbg45prg7rbnzkzds"))))
1021 (build-system gnu-build-system)
1023 `(("pkg-config" ,pkg-config)
1025 ("libgnome" ,libgnomeui)))
1026 (home-page "https://jcoppens.com/soft/linsmith/index.en.php")
1027 (synopsis "Smith Charting program")
1028 (description "LinSmith is a Smith Charting program, mainly designed for
1029 educational use. As such, there is an emphasis on capabilities that improve
1030 the 'showing the effect of'-style of operation.")
1031 (license license:gpl2+)))
1040 (uri (string-append "https://www.libvolk.org/releases/volk-"
1043 (base32 "1pjxz3piwy49njj5y2zk437prwkv9lfs5g48577jj3kcsg766vi3"))))
1044 (build-system cmake-build-system)
1047 (modify-phases %standard-phases
1048 (add-after 'install 'wrap-pythonpath
1049 (lambda* (#:key inputs outputs #:allow-other-keys)
1050 (let* ((out (assoc-ref outputs "out"))
1051 (python (assoc-ref inputs "python"))
1052 (file (string-append out "/bin/volk_modtool"))
1053 (path (string-append
1056 ,(version-major+minor
1057 (package-version python))
1059 (getenv "PYTHONPATH"))))
1061 `("PYTHONPATH" ":" prefix (,path))
1063 (,(string-append python "/bin:")))))
1067 ("python" ,python-wrapper)
1068 ("python-mako" ,python-mako)))
1069 (home-page "https://www.libvolk.org/")
1070 (synopsis "Vector-Optimized Library of Kernels")
1072 "@acronym{VOLK, Vector-Optimized Library of Kernels} contains procedures
1073 with machine-specific optimizations for mathematical functions. It also
1074 provides a machine-independent interface to select the best such procedures to
1075 use on a given system.")
1076 (license license:gpl3+)))
1078 (define-public minicom
1085 (uri (string-append "https://alioth.debian.org/frs/download.php/"
1086 "file/4215/" name "-" version ".tar.gz"))
1089 "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk"))))
1090 (build-system gnu-build-system)
1092 `(#:configure-flags '("--enable-lock-dir=/var/lock")
1094 (modify-phases %standard-phases
1095 (add-after 'unpack 'patch-lock-check
1097 (substitute* "configure"
1098 (("test -d [$]UUCPLOCK") "true"))
1101 `(("ncurses" ,ncurses)))
1102 (home-page "https://alioth.debian.org/projects/minicom/")
1103 (synopsis "Serial terminal emulator")
1104 (description "@code{minicom} is a serial terminal emulator.")
1105 (license license:gpl2+)))
1107 (define-public harminv
1114 (string-append "https://github.com/stevengj/harminv/"
1115 "releases/download/v" version "/"
1116 name "-" version ".tar.gz"))
1119 "0w1n4d249vlpda0hi6z1v13qp21vlbp3ykn0m8qg4rd5132j7fg1"))))
1120 (build-system gnu-build-system)
1122 `(#:configure-flags '("--enable-shared")
1124 (modify-phases %standard-phases
1125 (add-before 'configure 'fix-tests
1127 (substitute* "./sines-test.sh"
1128 ; change test frequency range - default fails
1129 (("0\\.15") "0.16"))
1132 `(("fortran" ,gfortran)))
1134 `(("lapack" ,lapack)))
1135 (home-page "https://github.com/stevengj/harminv")
1136 (synopsis "Harmonic inversion solver")
1138 "Harminv is a free program (and accompanying library) to solve the problem of
1139 harmonic inversion — given a discrete-time, finite-length signal that consists of a sum
1140 of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
1141 determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
1142 (license license:gpl2+)))
1144 (define-public guile-libctl
1146 (name "guile-libctl")
1152 "https://github.com/NanoComp/libctl/releases/download/v"
1153 version "/libctl-" version ".tar.gz"))
1156 "0x8r56lpfq83kfbq28vr25icl19xpfd6fjrxzcpdmv30l9pash83"))))
1157 (build-system gnu-build-system)
1159 `(#:configure-flags '("--enable-shared")))
1161 `(("fortran" ,gfortran)))
1163 `(("guile" ,guile-2.2)))
1164 (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl")
1165 (synopsis "Flexible control files implementation for scientific simulations")
1167 "Libctl is a Guile-based library implementing flexible control files
1168 for scientific simulations.")
1169 (license license:gpl2+)))
1179 "https://github.com/NanoComp/mpb/releases/download/v"
1180 version "/mpb-" version ".tar.gz"))
1183 "1jgrb7dd6qs6j6y1gnxmdgrh79l2bvqa6nk60a4pw1annsks4brd"))))
1184 (build-system gnu-build-system)
1187 (list (string-append "--with-libctl="
1188 (assoc-ref %build-inputs "libctl")
1190 "--enable-shared")))
1192 `(("fortran" ,gfortran)
1193 ("pkg-config" ,pkg-config)
1198 ("guile" ,guile-2.2)
1201 ("libctl" ,guile-libctl)
1202 ("readline" ,readline)
1204 (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands")
1205 (synopsis "Computes band structures and electromagnetic modes of dielectric
1208 "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes)
1209 of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
1210 fully-vectorial and three-dimensional methods.")
1211 (license license:gpl2+)))
1221 "https://github.com/NanoComp/meep/releases/download/v"
1222 version "/meep-" version ".tar.gz"))
1225 "14zyxmm3p80j5fz5b89sl7hgkgcisqjny5hjh4pi274ziqjqz8bm"))))
1226 (build-system gnu-build-system)
1229 (list (string-append "--with-libctl="
1230 (assoc-ref %build-inputs "libctl")
1233 `(("fortran" ,gfortran)
1234 ("pkg-config" ,pkg-config)
1239 ("guile" ,guile-2.2)
1240 ("harminv" ,harminv)
1243 ("libctl" ,guile-libctl)
1246 (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep")
1247 (synopsis "Finite-difference time-domain (FDTD) simulation software")
1249 "Meep is a finite-difference time-domain (FDTD) simulation software package
1250 developed at MIT to model electromagnetic systems.")
1251 (license license:gpl2+)))
1261 "mirror://sourceforge/mot-adms/adms-source/"
1262 (version-major+minor version) "/adms-" version ".tar.gz"))
1265 "1rn98l6jxcjhi6ai5f7p588khra9z80m0m0lql4n4sb7773fh1vk"))))
1266 (build-system gnu-build-system)
1270 (home-page "https://sourceforge.net/projects/mot-adms")
1271 (synopsis "Automatic device model synthesizer")
1273 "ADMS is a code generator that converts electrical compact device models
1274 specified in high-level description language into ready-to-compile C code for
1275 the API of spice simulators. Based on transformations specified in XML
1276 language, ADMS transforms Verilog-AMS code into other target languages.")
1277 (license license:gpl3)))
1279 (define-public capstone
1286 (url "https://github.com/aquynh/capstone")
1288 (file-name (git-file-name name version))
1291 "0dgf82kxj4rs45d6s8sr984c38sll1n5scpypjlyh21gh2yl4qfw"))))
1292 (build-system gnu-build-system)
1295 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1298 (modify-phases %standard-phases
1299 (delete 'configure) ; no configure script
1300 ;; cstool's Makefile ‘+=’s LDFLAGS, so we cannot pass it as a make flag.
1301 (add-before 'build 'fix-cstool-ldflags
1302 (lambda* (#:key outputs #:allow-other-keys)
1303 (setenv "LDFLAGS" (string-append "-Wl,-rpath="
1304 (assoc-ref outputs "out") "/lib"))
1306 (home-page "https://www.capstone-engine.org")
1307 (synopsis "Lightweight multi-platform, multi-architecture disassembly framework")
1309 "Capstone is a lightweight multi-platform, multi-architecture disassembly
1310 framework. Capstone can disassemble machine code for many supported architectures
1311 such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and xcore. It provides
1312 bindings for Python, Java, OCaml and more.")
1313 (license license:bsd-3)))
1315 ;; FIXME: This package has a timestamp embedded in
1316 ;; lib/python3.5/site-packages/capstone/__pycache__/__iti__.cpython-35.pyc
1317 (define-public python-capstone
1320 (name "python-capstone")
1322 `(("capstone" ,capstone)))
1323 (build-system python-build-system)
1326 (modify-phases %standard-phases
1327 (add-after 'unpack 'chdir-and-fix-setup-py
1329 (chdir "bindings/python")
1330 ;; Do not build the library again, because we already have it.
1331 (substitute* "setup.py" ((".* build_libraries.*") ""))
1332 ;; This substitution tells python-capstone where to find the
1334 (substitute* "capstone/__init__.py"
1335 (("pkg_resources.resource_filename.*")
1336 (string-append "'" (assoc-ref %build-inputs "capstone") "/lib',\n")))
1339 (define-public python2-capstone
1340 (package-with-python2 python-capstone))
1342 (define-public radare2
1349 (url "https://github.com/radareorg/radare2")
1353 "0gwdnrnk7wdgkajp2qwg4fyplh7nsbmf01bzx07px6xmiscd9z2s"))
1354 (file-name (git-file-name name version))))
1355 (build-system gnu-build-system)
1357 '(#:tests? #f ; tests require git and network access
1359 (modify-phases %standard-phases
1360 (add-before 'configure 'mklibdir
1361 (lambda* (#:key inputs outputs #:allow-other-keys)
1362 (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))
1365 (list "--with-openssl"
1367 "--with-syscapstone"
1373 ;; TODO: Add gmp and libzip and make the build system actually find them.
1375 `(("capstone" ,capstone)
1377 ("openssl" ,openssl)
1380 `(("pkg-config" ,pkg-config)))
1382 ;; In the Libs: section of r_hash.pc.
1383 `(("xxhash" ,xxhash)))
1384 (home-page "https://radare.org/")
1385 (synopsis "Reverse engineering framework")
1387 "Radare2 is a complete framework for reverse-engineering, debugging, and
1388 analyzing binaries. It is composed of a set of small utilities that can be
1389 used together or independently from the command line.
1391 Radare2 is built around a scriptable disassembler and hexadecimal editor that
1392 support a variety of executable formats for different processors and operating
1393 systems, through multiple back ends for local and remote files and disk
1396 It can also compare (@dfn{diff}) binaries with graphs and extract information
1397 like relocation symbols. It is able to deal with malformed binaries, making
1398 it suitable for security research and analysis.")
1399 (license license:lgpl3)))
1407 (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
1411 "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
1412 (build-system gnu-build-system)
1414 `(#:tests? #f ; no tests
1415 #:make-flags '("all" "asco-mpi")
1417 (modify-phases %standard-phases
1419 (add-before 'build 'fix-paths
1420 (lambda* (#:key inputs #:allow-other-keys)
1421 (let ((coreutils (assoc-ref inputs "coreutils-minimal")))
1422 (substitute* '("errfunc.c" "asco.c")
1424 (string-append coreutils "/bin/cp "))
1426 (string-append coreutils "/bin/nice")))
1427 (substitute* "Makefile"
1428 (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
1430 (replace 'install ; no install target
1431 (lambda* (#:key outputs #:allow-other-keys)
1432 (for-each (lambda (file)
1433 (install-file file (string-append
1434 (assoc-ref outputs "out")
1436 '("asco" "asco-mpi" "asco-test"
1437 "tools/alter/alter" "tools/log/log"))
1440 `(("mpi" ,openmpi)))
1442 `(("coreutils-minimal" ,coreutils-minimal)))
1443 (home-page "http://asco.sourceforge.net/")
1444 (synopsis "SPICE circuit optimizer")
1446 "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
1447 high-performance parallel differential evolution (DE) optimization algorithm.")
1448 (license license:gpl2+)))
1450 (define-public libngspice
1451 ;; Note: The ngspice's build system does not allow us to build both the
1452 ;; library and the executables in one go. Thus, we have two packages.
1453 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>.
1459 (uri (string-append "mirror://sourceforge/ngspice/ng-spice-rework/"
1460 version "/ngspice-" version ".tar.gz"))
1463 "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l"))
1464 (modules '((guix build utils)))
1465 ;; We remove the non-free cider and build without it.
1468 (delete-file-recursively "src/ciderlib")
1469 (delete-file "src/ciderinit")
1470 (substitute* "configure"
1471 (("src/ciderlib/Makefile") "")
1472 (("src/ciderlib/input/Makefile") "")
1473 (("src/ciderlib/support/Makefile") "")
1474 (("src/ciderlib/oned/Makefile") "")
1475 (("src/ciderlib/twod/Makefile") ""))
1477 (build-system gnu-build-system)
1479 `(;; No tests for libngspice exist.
1480 ;; The transient tests for ngspice fail.
1483 (modify-phases %standard-phases
1484 (add-after 'unpack 'patch-timestamps
1486 (substitute* "configure"
1487 (("`date`") "Thu Jan 1 00:00:01 UTC 1970"))
1489 (add-after 'unpack 'delete-program-manuals
1491 (substitute* "man/man1/Makefile.in"
1492 (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1 ngmultidec\\.1")
1495 (add-after 'install 'delete-script-files
1496 (lambda* (#:key outputs #:allow-other-keys)
1497 (delete-file-recursively
1498 (string-append (assoc-ref outputs "out")
1499 "/share/ngspice/scripts")))))
1501 (list "--enable-openmp"
1504 "--with-readline=yes")))
1509 `(("libxaw" ,libxaw)
1511 ("readline" ,readline)))
1512 (home-page "http://ngspice.sourceforge.net/")
1513 (synopsis "Mixed-level/mixed-signal circuit simulator")
1515 "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes
1516 @code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that
1517 provides code modeling support and simulation of digital components through
1518 an embedded event driven algorithm.")
1519 (license (list license:lgpl2.0+ ; code in frontend/numparam
1520 (license:non-copyleft "file:///COPYING") ; spice3 bsd-style
1521 license:public-domain)))) ; xspice
1523 (define-public ngspice
1524 ;; The ngspice executables (see libngpsice above.)
1525 (package (inherit libngspice)
1528 (substitute-keyword-arguments (package-arguments libngspice)
1529 ((#:configure-flags flags)
1530 `(delete "--with-ngshared" ,flags))
1532 `(modify-phases ,phases
1533 (add-after 'unpack 'delete-include-files
1535 (substitute* "src/Makefile.in"
1536 (("^SUBDIRS = misc maths frontend spicelib include/ngspice")
1537 "SUBDIRS = misc maths frontend spicelib"))
1539 (add-after 'install 'delete-cmpp-dlmain
1540 (lambda* (#:key outputs #:allow-other-keys)
1541 (for-each (lambda (file)
1543 (string-append (assoc-ref outputs "out")
1545 '("/bin/cmpp" "/share/ngspice/dlmain.c"))
1547 (delete 'delete-program-manuals)
1548 (delete 'delete-script-files)))))
1550 `(("libngspice" ,libngspice)
1551 ("readline" ,readline)))))
1553 (define trilinos-serial-xyce
1554 ;; Note: This is a Trilinos containing only the packages Xyce needs, so we
1555 ;; keep it private. See
1556 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#248>.
1557 ;; TODO: Remove when we have modular Trilinos packages?
1559 (name "trilinos-serial-xyce")
1562 (origin (method url-fetch)
1563 (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
1564 version "-Source.tar.gz"))
1567 "1zgrcksrcbmyy79mbdv0j4j4sh0chpigxk8vcrrwgaxyxwxxhrvw"))))
1568 (build-system cmake-build-system)
1570 `(#:out-of-source? #t
1572 (modify-phases %standard-phases
1573 ;; Delete unneeded tribits(build system) directory which makes validate-runpath
1575 (add-before 'validate-runpath 'delete-tribits
1576 (lambda* (#:key outputs #:allow-other-keys)
1577 (delete-file-recursively
1578 (string-append (assoc-ref outputs "out")
1579 "/lib/cmake/tribits"))
1582 (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
1583 "-DCMAKE_C_FLAGS=-O3 -fPIC"
1584 "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
1585 "-DTrilinos_ENABLE_NOX=ON"
1586 "-DNOX_ENABLE_LOCA=ON"
1587 "-DTrilinos_ENABLE_EpetraExt=ON"
1588 "-DEpetraExt_BUILD_BTF=ON"
1589 "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
1590 "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
1591 "-DTrilinos_ENABLE_TrilinosCouplings=ON"
1592 "-DTrilinos_ENABLE_Ifpack=ON"
1593 "-DTrilinos_ENABLE_Isorropia=ON"
1594 "-DTrilinos_ENABLE_AztecOO=ON"
1595 "-DTrilinos_ENABLE_Belos=ON"
1596 "-DTrilinos_ENABLE_Teuchos=ON"
1597 "-DTeuchos_ENABLE_COMPLEX=ON"
1598 "-DTrilinos_ENABLE_Amesos=ON"
1599 "-DAmesos_ENABLE_KLU=ON"
1600 "-DAmesos_ENABLE_UMFPACK=ON"
1601 "-DTrilinos_ENABLE_Sacado=ON"
1602 "-DTrilinos_ENABLE_Kokkos=OFF"
1603 "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
1604 "-DTPL_ENABLE_AMD=ON"
1605 "-DTPL_ENABLE_UMFPACK=ON"
1606 "-DTPL_ENABLE_BLAS=ON"
1607 "-DTPL_ENABLE_LAPACK=ON")))
1609 `(("fortran" ,gfortran)
1614 ("suitesparse" ,suitesparse)))
1615 (home-page "https://trilinos.org")
1616 (synopsis "Engineering and scientific problems algorithms")
1618 "The Trilinos Project is an effort to develop algorithms and enabling
1619 technologies within an object-oriented software framework for the solution of
1620 large-scale, complex multi-physics engineering and scientific problems. A
1621 unique design feature of Trilinos is its focus on packages.")
1622 (license (list license:lgpl2.1+
1625 (define-public xyce-serial
1627 (name "xyce-serial")
1630 (origin (method url-fetch)
1631 (uri (string-append "https://archive.org/download/Xyce-"
1632 version "/Xyce-" version ".tar.gz"))
1635 "09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
1636 (build-system gnu-build-system)
1642 (string-append "ARCHDIR="
1643 (assoc-ref %build-inputs "trilinos")))))
1645 `(("bison" ,bison-3.0) ;'configure' fails with Bison 3.4
1647 ("fortran" ,gfortran)))
1650 ("suitesparse" ,suitesparse)
1652 ("trilinos" ,trilinos-serial-xyce)))
1653 (home-page "https://xyce.sandia.gov/")
1654 (synopsis "High-performance analog circuit simulator")
1656 "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
1657 capable of solving extremely large circuit problems by supporting large-scale
1658 parallel computing platforms. It also supports serial execution.")
1659 (license license:gpl3+)))
1661 (define trilinos-parallel-xyce
1662 (package (inherit trilinos-serial-xyce)
1663 (name "trilinos-parallel-xyce")
1665 `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
1666 ((#:configure-flags flags)
1667 `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
1668 "-DTrilinos_ENABLE_Zoltan=ON"
1669 "-DTPL_ENABLE_MPI=ON")
1673 ,@(package-inputs trilinos-serial-xyce)))))
1675 (define-public xyce-parallel
1676 (package (inherit xyce-serial)
1677 (name "xyce-parallel")
1679 `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
1680 ((#:configure-flags flags)
1681 `(list "CXXFLAGS=-O3"
1688 (assoc-ref %build-inputs "trilinos")))))))
1690 `(("mpi" ,openmpi)))
1692 `(("trilinos" ,trilinos-parallel-xyce)
1693 ,@(alist-delete "trilinos"
1694 (package-inputs xyce-serial))))))
1696 (define-public freehdl
1702 (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
1706 "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))
1709 ;; Fix build with GCC 7. Patch taken from Arch Linux:
1710 ;; https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/freehdl
1712 (uri "https://git.archlinux.org/svntogit/community.git\
1713 /plain/trunk/build-fix.patch?h=packages/freehdl\
1714 &id=3bb90d64dfe6883e26083cd1fa96226d0d59175a")
1715 (file-name "freehdl-c++-namespace.patch")
1718 "09df3c70rx81rnhlhry1wpdhji274nx9jb74rfprk06l4739zm08")))))))
1719 (build-system gnu-build-system)
1722 (modify-phases %standard-phases
1723 (add-before 'configure 'patch-pkg-config
1724 (lambda* (#:key inputs #:allow-other-keys)
1725 (substitute* "freehdl/freehdl-config"
1727 (string-append (assoc-ref inputs "pkg-config")
1730 (string-append (assoc-ref inputs "coreutils")
1733 (add-after 'patch-pkg-config 'setenv
1734 (lambda* (#:key inputs #:allow-other-keys)
1735 (setenv "CXX" (string-append (assoc-ref inputs "gcc")
1737 (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
1740 (add-after 'setenv 'patch-gvhdl
1742 (substitute* "v2cc/gvhdl.in"
1743 (("--mode=link") "--mode=link --tag=CXX")
1744 (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
1746 (add-after 'patch-gvhdl 'patch-freehdl-gennodes
1747 (lambda* (#:key inputs #:allow-other-keys)
1748 (substitute* "freehdl/freehdl-gennodes.in"
1750 (string-append (assoc-ref inputs "guile") "/bin/guile"))
1751 (("\\(debug") ";(debug")
1752 (("\\(@ ") "(apply-emit")
1753 (("\\(@@ ") "(apply-mini-format"))
1755 (add-after 'configure 'patch-freehdl-pc
1756 (lambda* (#:key inputs #:allow-other-keys)
1757 (substitute* "freehdl.pc"
1759 (string-append "=" (assoc-ref inputs "gcc-toolchain")
1762 (string-append "=" (assoc-ref inputs "libtool")
1765 (add-after 'install-scripts 'make-wrapper
1766 (lambda* (#:key inputs outputs #:allow-other-keys)
1767 (let ((out (assoc-ref outputs "out")))
1768 ;; 'gvhdl' invokes the C compiler directly, so hard-code its
1770 (wrap-program (string-append out "/bin/gvhdl")
1771 `("CPLUS_INCLUDE_PATH" ":" prefix
1772 (,(string-append (assoc-ref inputs "gcc-toolchain")
1774 `("LIBRARY_PATH" ":" prefix
1775 (,(string-append (assoc-ref inputs "gcc-toolchain")
1778 (,(string-append (assoc-ref inputs "gcc-toolchain")
1780 ,(string-append (assoc-ref inputs "coreutils")
1782 (wrap-program (string-append out "/bin/freehdl-config")
1783 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
1786 `(("coreutils" ,coreutils)
1787 ("gcc-toolchain" ,gcc-toolchain)
1788 ("guile" ,guile-2.2)
1790 ("pkg-config" ,pkg-config)
1791 ("libtool" ,libtool)))
1793 `(("pkg-config-native" ,pkg-config)
1794 ("libtool-native" ,libtool)))
1795 (home-page "http://www.freehdl.seul.org/")
1796 (synopsis "VHDL simulator")
1798 "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
1799 VHDL'93 as well as VHDL'87 standards are supported.")
1800 (license (list license:gpl2+
1801 license:lgpl2.0+)))) ; freehdl's libraries
1804 ;; Qucs 0.0.19 segfaults when using glibc-2.26. Temporarily build from git.
1805 ;; TODO: When qucs-0.0.20 is released, revert the commit that introduced this
1806 ;; comment and update the package.
1807 (let ((commit "b4f27d9222568066cd59e4c387c51a35056c99d8")
1811 (version (git-version "0.0.19" revision commit))
1815 (url "https://github.com/Qucs/qucs")
1818 (base32 "10bclay9xhkffmsh4j4l28kj1qpxx0pnxja5vx6305cllnq4r3gb"))
1819 (file-name (string-append name "-" version "-checkout"))))
1820 (build-system gnu-build-system)
1823 (modify-phases %standard-phases
1824 (add-before 'bootstrap 'patch-bootstrap
1826 (for-each patch-shebang
1829 "qucs-doc/bootstrap"
1830 "qucs-core/bootstrap"))
1832 (add-before 'configure 'patch-configure
1833 (lambda* (#:key inputs #:allow-other-keys)
1834 (substitute* "qucs/configure"
1835 (("\\$QTDIR") (assoc-ref inputs "qt4")))
1837 (add-after 'patch-configure 'patch-scripts
1838 (lambda* (#:key inputs outputs #:allow-other-keys)
1839 (substitute* '("qucs/qucs/qucsdigi"
1840 "qucs/qucs/qucsdigilib"
1841 "qucs/qucs/qucsveri")
1843 (string-append (assoc-ref outputs "out") "/bin"))
1845 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
1847 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
1849 (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
1851 (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
1853 (string-append (assoc-ref inputs "sed") "/bin/sed"))
1855 (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
1857 (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
1859 (add-before 'check 'pre-check
1861 ;; The test suite requires a running X server.
1862 (system "Xvfb :1 &")
1863 (setenv "DISPLAY" ":1")
1865 (add-after 'install 'make-wrapper
1866 (lambda* (#:key inputs outputs #:allow-other-keys)
1867 (let ((out (assoc-ref outputs "out")))
1868 ;; 'qucs' directly invokes gcc, hence this wrapping.
1869 (wrap-program (string-append out "/bin/qucs")
1870 `("CPLUS_INCLUDE_PATH" ":" prefix
1871 (,(string-append (assoc-ref inputs "gcc-toolchain")
1874 (,(string-append (assoc-ref inputs "gcc-toolchain")
1876 `("LIBRARY_PATH" ":" prefix
1877 (,(string-append (assoc-ref inputs "gcc-toolchain")
1879 `("ADMSXMLBINDIR" ":" prefix
1880 (,(string-append (assoc-ref inputs "adms") "/bin")))
1881 `("ASCOBINDIR" ":" prefix
1882 (,(string-append (assoc-ref inputs "asco") "/bin")))
1883 `("QUCS_OCTAVE" ":" prefix
1884 (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
1886 #:parallel-build? #f ; race condition
1887 #:configure-flags '("--disable-doc"))) ; we need octave-epstk
1889 `(("autoconf" ,autoconf)
1890 ("automake" ,automake)
1894 ("libtool-native" ,libtool)
1895 ("pkg-config" ,pkg-config)
1896 ("python" ,python-2) ; for tests
1897 ("matplotlib" ,python2-matplotlib) ; for tests
1898 ("numpy" ,python2-numpy) ; for tests
1899 ("xorg-server" ,xorg-server-for-tests))) ; for tests
1903 ("coreutils" ,coreutils)
1904 ("freehdl" ,freehdl)
1905 ("gcc-toolchain" ,gcc-toolchain)
1906 ("iverilog" ,iverilog)
1907 ("libtool" ,libtool)
1908 ("octave" ,octave-cli)
1911 (home-page "http://qucs.sourceforge.net/")
1912 (synopsis "Circuit simulator with graphical user interface")
1914 "Qucs is a circuit simulator with graphical user interface. The software
1915 aims to support all kinds of circuit simulation types---e.g. DC, AC,
1916 S-parameter, transient, noise and harmonic balance analysis. Pure digital
1917 simulations are also supported.")
1918 (license license:gpl2+))))
1920 (define-public qucs-s
1926 (uri (string-append "https://github.com/ra3xdh/qucs_s/archive/"
1928 (file-name (string-append name "-" version ".tar.gz"))
1931 "12m1jwhb9qwvb141qzyskbxnw3wn1x22d02z4b4862p7xvccl5h7"))))
1932 (build-system cmake-build-system)
1934 `(#:tests? #f ; no tests
1936 (modify-phases %standard-phases
1937 (add-before 'configure 'patch-scripts
1938 (lambda* (#:key inputs #:allow-other-keys)
1939 (substitute* '("qucs/qucsdigi"
1943 (string-append (assoc-ref inputs "qucs") "/bin"))
1945 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
1947 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
1949 (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
1951 (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
1953 (string-append (assoc-ref inputs "sed") "/bin/sed"))
1955 (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
1957 (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
1959 (add-after 'patch-scripts 'patch-paths
1960 (lambda* (#:key inputs #:allow-other-keys)
1961 (substitute* "qucs/main.cpp"
1962 (((string-append "QucsSettings\\.Qucsator = QucsSettings\\.BinDir "
1963 "\\+ \"qucsator\" \\+ executableSuffix"))
1964 (string-append "}{ QucsSettings.Qucsator = \""
1965 (assoc-ref inputs "qucs") "/bin/qucsator\""))
1966 (((string-append "QucsSettings\\.XyceExecutable = "
1967 "\"/usr/local/Xyce-Release-6.8.0-OPENSOURCE/bin/Xyce"))
1968 (string-append "}{ QucsSettings.XyceExecutable = \""
1969 (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
1970 (((string-append "else QucsSettings\\.XyceParExecutable = "
1971 "\"mpirun -np %p /usr/local"
1972 "/Xyce-Release-6.8.0-OPENMPI-OPENSOURCE/bin/Xyce"))
1973 (string-append "QucsSettings.XyceParExecutable = \""
1974 (assoc-ref inputs "mpi") "/bin/mpirun -np %p "
1975 (assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
1976 (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
1977 (string-append "QucsSettings.NgspiceExecutable = " "\""
1978 (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
1979 (substitute* "qucs/extsimkernels/ngspice.cpp"
1980 (("share/qucs/xspice_cmlib") "share/qucs-s/xspice_cmlib"))
1981 (substitute* "qucs/qucs_actions.cpp"
1983 (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
1985 (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
1987 (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
1989 (add-after 'install 'install-scripts
1990 (lambda* (#:key inputs outputs #:allow-other-keys)
1993 (let ((file (string-append "../qucs_s-" ,version
1995 (out (assoc-ref outputs "out")))
1996 (install-file file (string-append out "/bin"))
1997 (chmod (string-append out "/bin/" script) #o555)))
1998 '("qucsdigi" "qucsdigilib" "qucsveri"))
2000 (add-after 'install-scripts 'make-wrapper
2001 (lambda* (#:key inputs outputs #:allow-other-keys)
2002 (let* ((out (assoc-ref outputs "out"))
2003 (file (string-append out "/bin/qucs-s"))
2004 (qucs (assoc-ref inputs "qucs"))
2005 (qucsator (string-append qucs "/bin/qucsator")))
2007 `("CPLUS_INCLUDE_PATH" ":" prefix
2008 (,(string-append (assoc-ref inputs "gcc-toolchain")
2011 (,(string-append (assoc-ref inputs "gcc-toolchain")
2013 `("LIBRARY_PATH" ":" prefix
2014 (,(string-append (assoc-ref inputs "gcc-toolchain")
2016 `("QUCSATOR" ":" prefix (,qucsator))
2017 `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
2018 `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms")
2020 `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco")
2022 `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave")
2024 (symlink qucsator (string-append out "/bin/qucsator"))
2027 `(("libtool-native" ,libtool)))
2031 ("coreutils" ,coreutils)
2032 ("freehdl" ,freehdl)
2033 ("gcc-toolchain" ,gcc-toolchain)
2034 ("iverilog" ,iverilog)
2035 ("libtool" ,libtool)
2037 ("ngspice" ,ngspice)
2038 ("octave" ,octave-cli)
2042 ("xyce-serial" ,xyce-serial)
2043 ("xyce-parallel" ,xyce-parallel)))
2044 (home-page "https://ra3xdh.github.io/")
2045 (synopsis "Circuit simulator with graphical user interface")
2047 "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
2048 The S letter indicates SPICE. The purpose of the Qucs-S subproject is to use
2049 free SPICE circuit simulation kernels with the Qucs GUI. It provides the
2050 simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
2051 (license license:gpl2+)))
2053 (define-public librepcb
2060 (uri (string-append "https://download.librepcb.org/releases/"
2061 version "/librepcb-" version "-source.zip"))
2063 (base32 "1b5dkanz3q0y5ag80w0l85hn7axrachb5m9zvyv4zvzrfy09wa88"))))
2064 (build-system gnu-build-system)
2066 `(("qtbase" ,qtbase)
2070 `(("qttools" ,qttools) ; for lrelease
2074 (modify-phases %standard-phases
2076 (lambda* (#:key inputs outputs #:allow-other-keys)
2079 (let ((lrelease (string-append (assoc-ref inputs "qttools")
2081 (out (assoc-ref outputs "out")))
2083 (string-append "QMAKE_LRELEASE=" lrelease)
2084 (string-append "PREFIX=" out)
2085 "../librepcb.pro")))))))
2086 (home-page "https://librepcb.org/")
2087 (synopsis "Electronic Design Automation tool")
2088 (description "LibrePCB is @dfn{Electronic Design Automation} (EDA)
2089 software to develop printed circuit boards. It features human readable file
2090 formats and complete project management with library, schematic and board
2092 (license (list license:gpl3+
2093 license:boost1.0 ; libs/clipper,
2094 ; libs/optional/tests/catch.hpp,
2095 ; libs/sexpresso/tests/catch.hpp
2096 license:expat ; libs/delaunay-triangulation,
2097 ; libs/parseagle, libs/type_safe
2098 license:asl2.0 ; libs/fontobene, libs/googletest,
2100 license:isc ; libs/hoedown
2101 license:cc0 ; libs/optional, libs/sexpresso
2102 license:bsd-2 ; libs/optional/tests/catch.hpp
2103 license:lgpl2.1+)))) ; libs/quazip
2112 (url "https://github.com/markwal/GPX.git")
2114 (file-name (git-file-name name version))
2117 "1yab269x8qyf7rd04vaxyqyjv4pzz9lp4sc4dwh927k23avr3rw5"))))
2118 (build-system gnu-build-system)
2119 (home-page "https://github.com/markwal/GPX")
2120 (synopsis "Converting gcode to x3g files for 3D printing")
2122 "GPX is a post processing utility for converting gcode output from 3D
2123 slicing software to x3g files for standalone 3D printing on common 3D
2125 (license license:gpl2+)))
2127 (define-public gnucap
2130 (version "20171003")
2134 (uri (string-append "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-"
2138 "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g"))))
2139 (build-system gnu-build-system)
2141 `(("readline" ,readline)))
2144 (modify-phases %standard-phases
2146 (lambda* (#:key outputs #:allow-other-keys)
2147 (let ((out (assoc-ref outputs "out")))
2148 ;; Set correct rpath so that gnucap finds libgnucap.so.
2149 (substitute* (list "apps/configure" "lib/configure"
2150 "main/configure" "modelgen/configure")
2152 (string-append "LDFLAGS = -Wl,-rpath=" out "/lib")))
2153 ;; gnucap uses a hand-written configure script that expects the
2154 ;; --prefix argument to be the first argument passed to it.
2155 (invoke "./configure" (string-append "--prefix=" out)))))
2157 (lambda* (#:key outputs #:allow-other-keys)
2158 (let ((out (assoc-ref outputs "out"))
2159 (libpath "../lib/O:../apps/O"))
2160 (with-directory-excursion "tests"
2161 ;; Make test return non-zero exit code when a test fails.
2163 (("/bin/sh") "/bin/sh -e")
2164 (("\\|\\| echo \"\\*\\*\\*\\* \\$ii fails \\*\\*\\*\\*\"") ""))
2165 ;; Fix expected plugin search path for test c_attach.1.gc
2166 (substitute* "==out/c_attach.1.gc.out"
2167 (("/usr/local/lib/gnucap")
2168 (string-append libpath ":" out "/lib/gnucap")))
2169 ;; Set library path so that gnucap can find libgnucap.so
2170 ;; while running the tests.
2171 (setenv "LD_LIBRARY_PATH" libpath)
2172 (invoke "./test" "../main/O/gnucap" "" "test-output" "==out"))))))))
2173 (home-page "https://www.gnu.org/software/gnucap/")
2174 (synopsis "Mixed analog and digital circuit simulator")
2175 (description "GNUcap is a circuit analysis package. It offers a general
2176 purpose circuit simulator and can perform DC and transient analyses, fourier
2177 analysis and AC analysis. The engine is designed to do true mixed-mode
2179 (license license:gpl3+)))
2181 (define-public cutter
2189 (url "https://github.com/radareorg/cutter")
2190 (commit (string-append "v" version))))
2191 (file-name (git-file-name name version))
2193 (base32 "0qj8jyij02nif4jpirl09ygwnv8a9zi3vkb5sf5s8mg7qwlpnvyk"))))
2194 (build-system gnu-build-system)
2197 (modify-phases %standard-phases
2199 (lambda* (#:key inputs outputs #:allow-other-keys)
2200 (let ((out (assoc-ref outputs "out"))
2201 (radare2 (assoc-ref inputs "radare2")))
2202 ;; Fix pkg-config detection ./src/lib_radare2.pri:PREFIX=/usr/lib
2203 ;; override `qmake PREFIX=`.
2204 (substitute* "./src/lib_radare2.pri"
2205 (("PREFIX") "R2PREFIX")
2206 (("R2PREFIX=/usr") (string-append "R2PREFIX=" radare2)))
2208 (string-append "PREFIX=" out)
2209 "./src/Cutter.pro")))))))
2211 `(("pkg-config" ,pkg-config)))
2213 `(("qtbase" ,qtbase)
2215 ("openssl" ,openssl)
2216 ("radare2" ,radare2)))
2217 (home-page "https://github.com/radareorg/cutter")
2218 (synopsis "GUI for radare2 reverse engineering framework")
2219 (description "Cutter is a GUI for radare2 reverse engineering framework.
2220 Its goal is making an advanced andcustomizable reverse-engineering platform
2221 while keeping the user experience at mind. Cutter is created by reverse
2222 engineers for reverse engineers.")
2223 (license (list license:cc-by-sa3.0 ;the "Iconic" icon set
2224 license:gpl3+)))) ;everything else
2226 (define-public lib3mf
2233 (uri (git-reference (url "https://github.com/3MFConsortium/lib3mf.git")
2234 (commit (string-append "v" version))))
2235 (file-name (git-file-name name version))
2238 "11wpk6n9ga2p57h1dcrp37w77mii0r7r6mlrgmykf7rvii1rzgqd"))))
2239 (build-system cmake-build-system)
2241 `(("googletest-source" ,(package-source googletest))))
2243 `(("libuuid" ,util-linux "lib")))
2246 (modify-phases %standard-phases
2247 (add-after 'unpack 'unpack-googletest
2248 (lambda* (#:key inputs #:allow-other-keys)
2249 (copy-recursively (assoc-ref inputs "googletest-source")
2250 "UnitTests/googletest")
2252 (synopsis "Implementation of the 3D Manufacturing Format (3MF) file standard")
2254 "Lib3MF is a C++ implementation of the 3D Manufacturing Format (3MF) file
2255 standard. It offers a way to integrate 3MF reading and writing capabilities, as
2256 well as conversion and validation tools for input and output data. The
2257 specification can be downloaded at @url{http://3mf.io/specification/}.")
2258 (home-page "https://3mf.io/")
2259 (license license:bsd-2)))
2261 (define-public openscad
2268 (uri (string-append "https://files.openscad.org/openscad-" version
2272 "0nbgk5q5pgnw53la0kccdcpz2f4xf6d6076rkn0q08z57hkc85ha"))
2273 (patches (search-patches
2274 "openscad-parser-boost-1.72.patch"))))
2275 (build-system cmake-build-system)
2279 ("double-conversion" ,double-conversion)
2281 ("fontconfig" ,fontconfig)
2284 ("harfbuzz" ,harfbuzz)
2286 ("libxml2" ,libxml2)
2289 ("opencsg" ,opencsg)
2290 ("qscintilla" ,qscintilla)
2292 ("qtmultimedia" ,qtmultimedia)))
2296 ("gettext" ,gettext-minimal)
2297 ("pkg-config" ,pkg-config)
2299 ;; the following are only needed for tests
2300 ("imagemagick" ,imagemagick)
2303 ("xvfb" ,xorg-server-for-tests)))
2306 (modify-phases %standard-phases
2308 (lambda* (#:key outputs #:allow-other-keys)
2310 (string-append "PREFIX=" (assoc-ref outputs "out")))
2314 (with-directory-excursion "tests"
2315 (invoke "cmake" ".")
2318 ;; strip python test files since lib dir ends up in out/share
2319 (for-each delete-file
2320 (find-files "libraries/MCAD" ".*\\.py"))
2322 (synopsis "Script-based 3D modeling application")
2324 "OpenSCAD is a 3D Computer-aided Design (CAD) application. Unlike an
2325 interactive modeler, OpenSCAD generates 3D models from a script, giving you
2326 full programmatic control over your models.")
2327 (home-page "https://www.openscad.org/")
2328 (license license:gpl2+)))
2330 (define-public freecad
2338 (url "https://github.com/FreeCAD/FreeCAD.git")
2340 (modules '((guix build utils)))
2343 ;; Fix build with Python 3.8, see
2344 ;; <https://tracker.freecadweb.org/view.php?id=4143>.
2345 (substitute* "src/Base/swigpyrun.inl"
2346 (("PyObject \\*modules = interp->modules;")
2347 "PyObject *modules = PyEval_GetBuiltins();"))
2349 (file-name (git-file-name name version))
2352 "170hk1kgrvsddrwykp24wyj0cha78zzmzbf50gn98x7ngqqs395s"))))
2353 (build-system qt-build-system)
2355 `(("doxygen" ,doxygen)
2356 ("graphviz" ,graphviz)
2357 ("qttools" ,qttools)
2358 ("pkg-config" ,pkg-config)
2364 ("freetype" ,freetype)
2367 ("libarea" ,libarea)
2368 ("libmedfile" ,libmedfile)
2369 ("libspnav" ,libspnav)
2372 ("openmpi" ,openmpi)
2373 ("opencascade-occt" ,opencascade-occt)
2374 ("python-matplotlib" ,python-matplotlib)
2375 ("python-pyside-2" ,python-pyside-2)
2376 ("python-pyside-2-tools" ,python-pyside-2-tools)
2377 ("python-shiboken-2" ,python-shiboken-2)
2378 ("python-wrapper" ,python-wrapper)
2381 ("qtx11extras" ,qtx11extras)
2382 ("qtxmlpatterns" ,qtxmlpatterns)
2383 ;; qtwebkit is optional. We remove it currently, because it takes
2384 ;; much time to compile and substitutes are often unavailable
2385 ;;("qtwebkit" ,qtwebkit)
2388 ("xerces-c" ,xerces-c)
2395 (string-append "-DCMAKE_INSTALL_LIBDIR="
2396 (assoc-ref %outputs "out") "/lib"))
2398 (modify-phases %standard-phases
2399 (add-before 'configure 'restore-pythonpath
2401 (substitute* "src/Main/MainGui.cpp"
2402 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
2404 (add-after 'install 'wrap-pythonpath
2405 (lambda* (#:key outputs #:allow-other-keys)
2406 (let ((out (assoc-ref outputs "out")))
2407 (wrap-program (string-append out "/bin/FreeCAD")
2409 'prefix (list (getenv "PYTHONPATH")))))
2411 (home-page "https://www.freecadweb.org/")
2412 (synopsis "Your Own 3D Parametric Modeler")
2414 "FreeCAD is a general purpose feature-based, parametric 3D modeler for
2415 CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
2416 product design but also fits a wider range of uses in engineering, such as
2417 architecture or other engineering specialties. It is 100% Open Source (LGPL2+
2418 license) and extremely modular, allowing for very advanced extension and
2427 (define-public libmedfile
2435 "https://files.salome-platform.org/Salome/other/med-"
2439 "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
2440 (build-system cmake-build-system)
2441 (inputs `(("hdf5" ,hdf5-1.10)))
2444 (modify-phases %standard-phases
2445 (add-after 'install 'remove-test-output
2446 (lambda* (#:key outputs #:allow-other-keys)
2447 (let ((out (assoc-ref outputs "out")))
2448 (delete-file-recursively
2449 (string-append out "/bin/testc"))
2451 (home-page "https://www.salome-platform.org")
2452 (synopsis "Library to read and write MED files")
2454 "The purpose of the MED module is to provide a standard for storing and
2455 recovering computer data associated to numerical meshes and fields, and to
2456 facilitate the exchange between codes and solvers.
2458 The persistent data storage is based upon HDF format (like CGNS, a standard
2459 developed by Boeing and NASA in the area of Computational Fluid Dynamic).
2461 MED also provides structures to hold data on meshes and fields. These
2462 structures are exchanged between solvers, hide the communication level (CORBA
2463 or MPI), and offer persistence (read/write in .med files).
2465 The main benefit of a common exchange format is reduced complexity of code
2466 coupling. It also allows sharing such high level functionalities as
2467 computation of nodal connectivity of sub-elements (faces and edges),
2468 arithmetic operations on fields, entity location functionalities, and
2469 interpolation toolkit.")
2470 (license license:gpl3+)))
2472 (define-public libarea
2473 (let ((revision "1")
2474 (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
2477 (version (git-version "0" revision commit))
2481 (uri (git-reference (url "https://github.com/Heeks/libarea.git")
2483 (file-name (git-file-name name version))
2485 (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
2486 (build-system gnu-build-system)
2487 (inputs `(("boost" ,boost)
2488 ("python-wrapper" ,python-wrapper)))
2490 `(("cmake" ,cmake-minimal)))
2494 (modify-phases %standard-phases
2495 (add-after 'configure 'cmake-configure
2496 (lambda* (#:key inputs outputs #:allow-other-keys)
2497 (let ((out (assoc-ref outputs "out"))
2498 (cmake (assoc-ref inputs "cmake")))
2501 (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
2502 (delete 'configure))))
2503 (home-page "https://github.com/Heeks/libarea")
2505 "Library and python module for pocketing and profiling operations")
2507 "Area is a CAM-related software for pocketing operation.
2509 This project provides library and associated python-module to compute pocket
2515 (define-public libspnav
2522 (url "https://github.com/FreeSpacenav/libspnav.git")
2523 (commit (string-append "libspnav-" version))))
2526 "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba"))
2527 (file-name (git-file-name name version))))
2528 (build-system gnu-build-system)
2530 `(("libx11" ,libx11)))
2531 (arguments `(#:tests? #f))
2532 (home-page "http://spacenav.sourceforge.net/")
2534 "Library for communicating with spacenavd or 3dxsrv")
2536 "The libspnav library is provided as a replacement of the magellan
2537 library. It provides a cleaner, and more orthogonal interface. libspnav
2538 supports both the original X11 protocol for communicating with the driver, and
2539 the new alternative non-X protocol. Programs that choose to use the X11
2540 protocol, are automatically compatible with either the free spacenavd driver
2541 or the official 3dxserv, as if they were using the magellan SDK.
2543 Also, libspnav provides a magellan API wrapper on top of the new API. So, any
2544 applications that were using the magellan library, can switch to libspnav
2545 without any changes. And programmers that are familiar with the magellan API
2546 can continue using it with a free library without the restrictions of the
2548 (license license:bsd-3)))
2550 (define-public openctm
2551 (let ((revision 603))
2552 ;; Previous versions don't compile, they need to link libGL and libGLU.
2553 ;; Fixed in this revision.
2556 (version (string-append "1.0.3." (number->string revision)))
2561 (url "https://svn.code.sf.net/p/openctm/code/trunk")
2562 (revision revision)))
2563 (file-name (string-append name "-" version "-checkout"))
2565 (base32 "01wb70m48xh5gwhv60a5brv4sxl0i0rh038w32cgnlxn5x86s9f1"))))
2566 (build-system gnu-build-system)
2568 `(("pkg-config" ,pkg-config)))
2575 `(#:tests? #f ;no tests
2577 (modify-phases %standard-phases
2579 (lambda* (#:key outputs #:allow-other-keys)
2580 (rename-file "Makefile.linux" "Makefile")
2581 (let ((out (assoc-ref outputs "out")))
2582 ;; Create output directories.
2583 (mkdir-p (string-append out "/lib"))
2584 (mkdir-p (string-append out "/include"))
2585 (mkdir-p (string-append out "/bin"))
2587 (substitute* "tools/Makefile.linux"
2589 (string-append "-rpath," out "/lib/"))
2592 ;; Set right output.
2593 (substitute* "Makefile"
2595 (string-append out "/lib"))
2599 (synopsis "3D triangle mesh format and related tools and libraries")
2600 (description "OpenCTM is a file format, a software library and a tool set
2601 for compression of 3D triangle meshes. The geometry is compressed to a
2602 fraction of comparable file formats (3DS, STL, COLLADA...), and the format is
2603 accessible through a simple API")
2604 (license license:zlib)
2605 (home-page "http://openctm.sourceforge.net/"))))
2607 (define-public lib3ds
2615 "https://storage.googleapis.com/google-code-archive-downloads"
2616 "/v2/code.google.com/lib3ds/lib3ds-" version ".zip"))
2618 (base32 "1qr9arfdkjf7q11xhvxwzmhxqz3nhcjkyb8zzfjpz9jm54q0rc7m"))))
2619 (build-system gnu-build-system)
2621 `(("unzip" ,unzip)))
2622 (home-page "https://code.google.com/archive/p/lib3ds")
2623 (synopsis "3DS format file toolkit")
2624 (description "Lib3ds is a toolkit for handling the 3DS format for 3D
2625 model files. Its main goal is to simplify the creation of 3DS import and
2627 (license license:lgpl2.1+)))
2629 (define-public meshlab
2636 (url "https://github.com/cnr-isti-vclab/meshlab")
2637 (commit (string-append "Meshlab-" version))
2639 (file-name (git-file-name name version))
2641 (base32 "1cgx24wxh2ah5pff51rcrk6x8qcdjpkxcdak7s4cfzmxvjlshydd"))))
2642 (build-system cmake-build-system)
2644 `(("qtbase" ,qtbase)
2645 ("qtscript" ,qtscript)
2646 ("qtxmlpatterns" ,qtxmlpatterns)
2650 ("muparser" ,muparser)
2653 ("libfreenect" ,libfreenect)
2655 ("openctm" ,openctm)
2656 ;; FIXME: Compilation fails with system qhull:
2657 ;; https://github.com/cnr-isti-vclab/meshlab/issues/678
2661 `(#:tests? #f ; Has no tests
2663 (modify-phases %standard-phases
2664 (add-after 'unpack 'go-to-source-dir
2665 (lambda _ (chdir "src") #t))
2666 (add-after 'install 'move-files
2667 (lambda* (#:key outputs #:allow-other-keys)
2668 (let ((lib (string-append (assoc-ref outputs "out")
2671 (string-append lib "/meshlab/libmeshlab-common.so")
2672 (string-append lib "/libmeshlab-common.so"))
2674 (synopsis "3D triangular mesh processing and editing software")
2675 (home-page "https://www.meshlab.net/")
2676 (description "MeshLab is a system for the processing and
2677 editing of unstructured large 3D triangular meshes. It is aimed to help the
2678 processing of the typical not-so-small unstructured models arising in 3D
2679 scanning, providing a set of tools for editing, cleaning, healing, inspecting,
2680 rendering and converting this kind of meshes. These tools include MeshLab
2681 proper, a versatile program with a graphical user interface, and meshlabserver,
2682 a program that can perform mesh processing tasks in batch mode, without a
2684 (license license:gpl3+)))
2687 ;; Upstream has yet to tag any releases.
2688 (let ((commit "d33317a46e3b7c48130a471a48cbfea1abab70d8")
2692 (version (git-version "0.0.0" revision commit))
2697 (url "git://git.savannah.gnu.org/poke.git")
2701 (base32 "1dd0r1x123bqi78lrsk58rvg9c9wka0kywdyzn7g3i4hkh54xb7d"))
2702 (file-name (git-file-name name version))))
2703 (build-system gnu-build-system)
2704 ;; The GUI, which we elide, requires tcl and tk.
2705 (native-inputs `(("autoconf" ,autoconf)
2706 ("automake" ,automake)
2707 ;; Requires bison 3.6+ but we currently only have 3.5.
2708 ;; Bison 3.6 will be available in the next core update.
2709 ("bison-3.6" ,bison-3.6)
2711 ("dejagnu" ,dejagnu)
2713 ("gettext" ,gettext-minimal)
2714 ("help2man" ,help2man)
2715 ("libtool" ,libtool)
2717 ("pkg-config" ,pkg-config)
2718 ("python-2" ,python-2)
2719 ("python-3" ,python-3)
2720 ("texinfo" ,texinfo)))
2721 ;; FIXME: Enable NBD support by adding `libnbd' (currently unpackaged).
2722 ;; FIXME: A "hyperlinks-capable" `libtexststyle' needed for the hserver.
2723 (inputs `(("json-c" ,json-c)
2725 ("readline" ,readline)))
2727 ;; To build the GUI, add the `--enable-gui' configure flag.
2728 ;; To enable the "hyperlink server", add the `--enable-hserver' flag.
2729 `(#:configure-flags '("--enable-mi")
2730 #:phases (modify-phases %standard-phases
2731 ;; This is a non-trivial bootstrap that needs many of the
2732 ;; native-inputs and thus must run after `patch-shebangs'.
2734 (add-after 'patch-source-shebangs 'bootstrap
2736 (invoke "./bootstrap" "--no-git"
2737 "--no-bootstrap-sync"
2738 "--gnulib-srcdir=gnulib")
2740 (home-page "http://jemarch.net/poke.html")
2741 (synopsis "Interactive, extensible editor for binary data")
2742 (description "GNU poke is an interactive, extensible editor for binary
2743 data. Not limited to editing basic entities such as bits and bytes, it
2744 provides a full-fledged procedural, interactive programming language designed
2745 to describe data structures and to operate on them.")
2746 (license license:gpl3+))))