1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
4 ;;; Copyright © 2016, 2018 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 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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages engineering)
34 #:use-module (guix packages)
35 #:use-module (guix download)
36 #:use-module (guix gexp)
37 #:use-module (guix git-download)
38 #:use-module (guix monads)
39 #:use-module (guix store)
40 #:use-module (guix utils)
41 #:use-module ((srfi srfi-1) #:hide (zip))
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix build-system ant)
44 #:use-module (guix build-system cmake)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system python)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages algebra)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages bison)
52 #:use-module (gnu packages boost)
53 #:use-module (gnu packages check)
54 #:use-module (gnu packages cmake)
55 #:use-module (gnu packages commencement)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages curl)
58 #:use-module (gnu packages documentation)
59 #:use-module (gnu packages flex)
60 #:use-module (gnu packages fontutils)
61 #:use-module (gnu packages fpga)
62 #:use-module (gnu packages freedesktop)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages gd)
65 #:use-module (gnu packages gettext)
66 #:use-module (gnu packages ghostscript)
67 #:use-module (gnu packages gl)
68 #:use-module (gnu packages glib)
69 #:use-module (gnu packages gnome)
70 #:use-module (gnu packages gperf)
71 #:use-module (gnu packages graphics)
72 #:use-module (gnu packages graphviz)
73 #:use-module (gnu packages groff)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages guile)
76 #:use-module (gnu packages image)
77 #:use-module (gnu packages image-processing)
78 #:use-module (gnu packages imagemagick)
79 #:use-module (gnu packages linux) ;FIXME: for pcb
80 #:use-module (gnu packages m4)
81 #:use-module (gnu packages maths)
82 #:use-module (gnu packages multiprecision)
83 #:use-module (gnu packages mpi)
84 #:use-module (gnu packages ncurses)
85 #:use-module (gnu packages perl)
86 #:use-module (gnu packages pkg-config)
87 #:use-module (gnu packages python)
88 #:use-module (gnu packages python-xyz)
89 #:use-module (gnu packages qt)
90 #:use-module (gnu packages readline)
91 #:use-module (gnu packages swig)
92 #:use-module (gnu packages tbb)
93 #:use-module (gnu packages tcl)
94 #:use-module (gnu packages texinfo)
95 #:use-module (gnu packages tls)
96 #:use-module (gnu packages tex)
97 #:use-module (gnu packages version-control)
98 #:use-module (gnu packages wxwidgets)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages xorg))
102 (define-public librecad
109 "https://github.com/LibreCAD/LibreCAD/archive/"
111 (file-name (string-append name "-" version ".tar.gz"))
114 "01nvc1g3si05r5np1pzn62ah9w84p8nxa32wqrjh6gdi17jfvi3l"))))
115 (build-system gnu-build-system)
118 (modify-phases %standard-phases
119 ;; Without this patch boost complains that "make_array" is not a
120 ;; member of "boost::serialization".
121 (add-after 'unpack 'patch-boost-error
123 (substitute* "librecad/src/lib/math/lc_quadratic.h"
124 (("#include \"rs_vector.h\"" line)
126 "\n#include <boost/serialization/array_wrapper.hpp>")))
127 (substitute* "librecad/src/lib/math/rs_math.cpp"
128 (("#include <boost/numeric/ublas/matrix.hpp>" line)
129 (string-append "#include <boost/serialization/array_wrapper.hpp>\n"
132 ;; Fix build against Qt 5.11.
133 (add-after 'unpack 'add-missing-headers
135 (substitute* "librecad/src/ui/generic/widgetcreator.cpp"
136 (("#include <QPushButton>") "#include <QPushButton>
137 #include <QActionGroup>"))
139 (add-after 'unpack 'patch-paths
140 (lambda* (#:key outputs #:allow-other-keys)
141 (let ((out (assoc-ref outputs "out")))
142 (substitute* "librecad/src/lib/engine/rs_system.cpp"
143 (("/usr/share") (string-append out "/share"))))))
145 (lambda* (#:key inputs #:allow-other-keys)
146 (system* "qmake" (string-append "BOOST_DIR="
147 (assoc-ref inputs "boost")))))
149 (lambda* (#:key outputs #:allow-other-keys)
150 (let* ((out (assoc-ref outputs "out"))
151 (bin (string-append out "/bin"))
152 (share (string-append out "/share/librecad")))
154 (install-file "unix/librecad" bin)
156 (copy-recursively "unix/resources" share))
158 ;; Ensure that icons are found at runtime
159 (add-after 'install 'wrap-executable
160 (lambda* (#:key inputs outputs #:allow-other-keys)
161 (let* ((out (assoc-ref outputs "out"))
162 (qt '("qtbase" "qtsvg")))
163 (wrap-program (string-append out "/bin/librecad")
164 `("QT_PLUGIN_PATH" ":" prefix
165 ,(map (lambda (label)
166 (string-append (assoc-ref inputs label)
167 "/lib/qt5/plugins/"))
172 ("muparser" ,muparser)
173 ("freetype" ,freetype)
177 `(("pkg-config" ,pkg-config)
179 (home-page "http://librecad.org/")
180 (synopsis "Computer-aided design (CAD) application")
182 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
184 (license license:gpl2)))
186 (define-public geda-gaf
193 "http://ftp.geda-project.org/geda-gaf/unstable/v"
194 (version-major+minor version) "/"
195 version "/geda-gaf-" version ".tar.gz"))
198 "14mk45pfz11v54q66gafw2l68n1p5ssvvjmdm8ffgc8x1w5ajfrz"))))
199 (build-system gnu-build-system)
202 (modify-phases %standard-phases
203 ;; tests require a writable HOME
204 (add-before 'check 'set-home
206 (setenv "HOME" (getenv "TMPDIR"))
208 ;; FIXME: These two tests fail for unknown reasons. They return "2"
209 ;; when they should return "1".
210 (add-after 'unpack 'disable-failing-tests
212 (substitute* "utils/tests/gxyrs/tests.list"
213 (("^do_nothing.*") ""))
216 (let ((pcb (assoc-ref %build-inputs "pcb")))
217 (list (string-append "--with-pcb-datadir=" pcb "/share")
218 (string-append "--with-pcb-lib-path="
219 pcb "/share/pcb/pcblib-newlib:"
220 pcb "/share/pcb/newlib")))))
225 ("desktop-file-utils" ,desktop-file-utils)
226 ("shared-mime-info" ,shared-mime-info)
230 `(("pkg-config" ,pkg-config)
231 ("perl" ,perl))) ; for tests
232 (home-page "http://geda-project.org/")
233 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
235 "Gaf stands for “gschem and friends”. It is a subset of the entire tool
236 suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
237 which currently includes: gschem, a schematic capture program; gnetlist, a
238 netlist generation program; gsymcheck, a syntax checker for schematic symbols;
239 gattrib, a spreadsheet programm that manipulates the properties of symbols of
240 a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
241 tool to forward annotation from your schematic to layout using PCB; some minor
243 (license license:gpl2+)))
245 (define-public lepton-eda
246 ;; This is a fork of gEDA/gaf started in late 2016. One of its goal is to
247 ;; keep and to extend Guile support.
251 (version "1.9.5-20180820")
252 (home-page "https://github.com/lepton-eda/lepton-eda")
255 (uri (git-reference (url home-page) (commit version)))
258 "1ayaccvw18zh4g7a4x5jf6yxkphi5xafb0hpc732g59qkgwfcmlr"))
259 (file-name (git-file-name name version))))
261 `(("autoconf" ,autoconf)
262 ("automake" ,automake)
264 ("gettext" ,gnu-gettext)
268 ,@(package-native-inputs geda-gaf)))
269 ;; For now it's Guile 2.0, not 2.2.
271 (substitute-keyword-arguments (package-arguments geda-gaf)
272 ((#:configure-flags flags ''())
273 ;; When running "make", the POT files are built with the build time as
274 ;; their "POT-Creation-Date". Later on, "make" notices that .pot
275 ;; files were updated and goes on to run "msgmerge"; as a result, the
276 ;; non-deterministic POT-Creation-Date finds its way into .po files,
277 ;; and then in .gmo files. To avoid that, simply make sure 'msgmerge'
278 ;; never runs. See <https://bugs.debian.org/792687>.
279 `(cons "ac_cv_path_MSGMERGE=true" ,flags))
280 ((#:phases phases '%standard-phases)
281 `(modify-phases ,phases
282 (add-before 'bootstrap 'prepare
284 ;; Some of the scripts there are invoked by autogen.sh.
285 (for-each patch-shebang (find-files "build-tools"))
287 ;; Make sure 'msgmerge' can modify the PO files.
288 (for-each (lambda (po)
290 (find-files "." "\\.po$"))
292 ;; This would normally be created by invoking 'git', but it
293 ;; doesn't work here.
294 (call-with-output-file "version.h"
296 (format port "#define PACKAGE_DATE_VERSION \"~a\"~%"
297 ,(string-drop version
298 (+ 1 (string-index version #\-))))
299 (format port "#define PACKAGE_DOTTED_VERSION \"~a\"~%"
300 ,(string-take version
301 (string-index version #\-)))
302 (format port "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%")))
305 "Lepton EDA ia an @dfn{electronic design automation} (EDA) tool set
306 forked from gEDA/gaf in late 2016. EDA tools are used for electrical circuit
307 design, schematic capture, simulation, prototyping, and production. Lepton
308 EDA includes tools for schematic capture, attribute management, bill of
309 materials (BOM) generation, netlisting into over 20 netlist formats, analog
310 and digital simulation, and printed circuit board (PCB) layout, and many other
319 (uri (string-append "mirror://sourceforge/pcb/pcb/pcb-" version
320 "/pcb-" version ".tar.gz"))
323 "1a7rilp75faidny0r4fdwdxkflyrqp6svxv9lbg7h868293962iz"))))
324 (build-system gnu-build-system)
327 (modify-phases %standard-phases
328 (add-after 'unpack 'use-wish8.6
330 (substitute* "configure"
331 (("wish85") "wish8.6"))
333 ;; It checks for "xhost", which we don't have. This shouldn't
334 ;; matter, because the test is supposed to be skipped, but it causes
335 ;; "run_tests.sh" (and thus the "check" phase) to fail.
336 (add-after 'unpack 'fix-check-for-display
338 (substitute* "tests/run_tests.sh"
339 (("have_display=no") "have_display=yes"))
341 (add-after 'install 'wrap
342 (lambda* (#:key inputs outputs #:allow-other-keys)
343 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
344 ;; fix of the mesa package we wrap the pcb executable such that
345 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
346 (let* ((out (assoc-ref outputs "out"))
347 (path (string-append (assoc-ref inputs "udev") "/lib")))
348 (wrap-program (string-append out "/bin/pcb")
349 `("LD_LIBRARY_PATH" ":" prefix (,path))))
351 (add-before 'check 'pre-check
354 (setenv "DISPLAY" ":1")
359 ("udev" ,eudev) ;FIXME: required by mesa
363 ("gtkglext" ,gtkglext)
364 ("desktop-file-utils" ,desktop-file-utils)
365 ("shared-mime-info" ,shared-mime-info)
368 `(("pkg-config" ,pkg-config)
369 ("intltool" ,intltool)
373 ("imagemagick" ,imagemagick)
375 ("ghostscript" ,ghostscript)
376 ("xvfb" ,xorg-server)))
377 (home-page "http://pcb.geda-project.org/")
378 (synopsis "Design printed circuit board layouts")
380 "GNU PCB is an interactive tool for editing printed circuit board
381 layouts. It features a rats-nest implementation, schematic/netlist import,
382 and design rule checking. It also includes an autorouter and a trace
383 optimizer; and it can produce photorealistic and design review images.")
384 (license license:gpl2+)))
386 (define-public pcb-rnd
387 (package (inherit pcb)
392 (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/"
393 "pcb-rnd-" version ".tar.gz"))
396 "0pycynla60b96jkb6fh6f4sx663pqbzjwnixhw5ym8sym2absm09"))))
398 `(#:tests? #f ; no check target
400 (modify-phases %standard-phases
401 (add-after 'unpack 'cc-is-gcc
402 (lambda _ (setenv "CC" "gcc") #t))
404 ;; The configure script doesn't tolerate most of our configure flags.
405 (lambda* (#:key outputs #:allow-other-keys)
406 (invoke "sh" "configure"
407 (string-append "--prefix="
408 (assoc-ref outputs "out"))))))))
409 (home-page "http://repo.hu/projects/pcb-rnd/")
410 (description "PCB RND is a fork of the GNU PCB circuit board editing tool
411 featuring various improvements and bug fixes.")))
413 (define-public fastcap
416 (version "2.0-18Sep92")
418 (method url-fetch/tarbomb)
419 (uri (string-append "http://www.rle.mit.edu/cpg/codes/"
420 name "-" version ".tgz"))
423 "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k"))
425 ;; Remove a non-free file.
427 (delete-file "doc/psfig.sty")
429 (patches (search-patches "fastcap-mulSetup.patch"
430 "fastcap-mulGlobal.patch"))))
431 (build-system gnu-build-system)
433 ;; FIXME: with texlive-tiny citation references are rendered as question
434 ;; marks. During the build warnings like these are printed:
435 ;; LaTeX Warning: Citation `nabors91' on page 2 undefined on input line 3.
436 `(("texlive" ,(texlive-union (list texlive-fonts-amsfonts)))
437 ("ghostscript" ,ghostscript)))
439 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
441 #:tests? #f ;; no tests-suite
442 #:modules ((srfi srfi-1)
443 ,@%gnu-build-system-modules)
445 (modify-phases %standard-phases
446 (add-after 'build 'make-doc
448 (invoke "make" "CC=gcc" "RM=rm" "SHELL=sh" "manual")))
449 (add-before 'make-doc 'fix-doc
451 (substitute* "doc/Makefile" (("/bin/rm") (which "rm")))
452 (substitute* (find-files "doc" "\\.tex")
453 (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}"
455 (string-append "\\includegraphics[scale=" scale "]{"
457 (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}"
459 (string-append "\\includegraphics[width=" width "]{"
461 (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}"
463 (string-append "\\includegraphics[height=" height "]{"
465 (("\\\\psfig\\{figure=([^,]*)\\}" all file)
466 (string-append "\\includegraphics{" file "}")))
467 (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex")
468 (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}"
470 (string-append "\\documentclass[" options "]{"
472 "\\usepackage{graphicx}\n"
473 "\\usepackage{robinspace}"))
474 (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all)
475 (string-append "%" all))
476 (("\\\\setstretch\\{.*\\}" all)
477 (string-append "%" all)))
480 (add-before 'install 'clean-bin
482 (delete-file (string-append (getcwd) "/bin/README"))
484 (add-before 'install 'make-pdf
486 (setenv "HOME" "/tmp") ; FIXME: for texlive font cache
487 (with-directory-excursion "doc"
489 (for-each (lambda (file)
490 (invoke "dvips" file "-o"))
491 (find-files "." "\\.dvi"))
492 (for-each (lambda (file)
493 (invoke "ps2pdf" file))
494 '("mtt.ps" "ug.ps" "tcad.ps"))
495 (invoke "make" "clean")))))
497 (lambda* (#:key outputs #:allow-other-keys)
498 (let* ((out (assoc-ref outputs "out"))
499 (data (string-append out "/share"))
500 (bin (string-append out "/bin"))
501 (doc (string-append data "/doc/" ,name "-" ,version))
502 (examples (string-append doc "/examples")))
503 (with-directory-excursion "bin"
504 (for-each (lambda (f)
505 (install-file f bin))
506 (find-files "." ".*")))
507 (copy-recursively "doc" doc)
508 (copy-recursively "examples" examples)
510 (home-page "http://www.rle.mit.edu/cpg/research_codes.htm")
511 (synopsis "Multipole-accelerated capacitance extraction program")
513 "Fastcap is a capacitance extraction program based on a
514 multipole-accelerated algorithm.")
515 (license (license:non-copyleft #f "See fastcap.c."))))
517 (define-public fasthenry
520 (version "3.0-12Nov96")
523 (file-name (string-append name "-" version ".tar.gz"))
525 "http://www.rle.mit.edu/cpg/codes/" name
526 "-" version ".tar.z"))
528 (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
529 (patches (search-patches "fasthenry-spAllocate.patch"
530 "fasthenry-spBuild.patch"
531 "fasthenry-spUtils.patch"
532 "fasthenry-spSolve.patch"
533 "fasthenry-spFactor.patch"))))
534 (build-system gnu-build-system)
536 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
538 #:tests? #f ;; no tests-suite
539 #:modules ((srfi srfi-1)
540 ,@%gnu-build-system-modules)
542 (modify-phases %standard-phases
545 (lambda* (#:key outputs #:allow-other-keys)
546 (let* ((out (assoc-ref outputs "out"))
547 (data (string-append out "/share"))
548 (bin (string-append out "/bin"))
549 (doc (string-append data "/doc/" ,name "-" ,version))
550 (examples (string-append doc "/examples")))
551 (with-directory-excursion "bin"
552 (for-each (lambda (f)
553 (install-file f bin))
554 (find-files "." ".*")))
555 (copy-recursively "doc" doc)
556 (copy-recursively "examples" examples)
558 (home-page "http://www.rle.mit.edu/cpg/research_codes.htm")
559 (synopsis "Multipole-accelerated inductance analysis program")
561 "Fasthenry is an inductance extraction program based on a
562 multipole-accelerated algorithm.")
563 (license (license:non-copyleft #f "See induct.c."))))
565 (define-public fritzing
572 (url "https://github.com/fritzing/fritzing-app.git")
574 (file-name (git-file-name name version))
577 "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
578 (build-system gnu-build-system)
581 (modify-phases %standard-phases
583 (lambda* (#:key inputs outputs #:allow-other-keys)
584 (copy-recursively (assoc-ref inputs "fritzing-parts-db")
586 ;; Make compatible with libgit2 > 0.24
587 (substitute* "src/version/partschecker.cpp"
588 (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
589 "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
591 ;; Use system libgit2 and boost.
592 (substitute* "phoenix.pro"
593 (("^LIBGIT2INCLUDE =.*")
594 (string-append "LIBGIT2INCLUDE="
595 (assoc-ref inputs "libgit2") "/include\n"))
596 (("^ LIBGIT2LIB =.*")
597 (string-append " LIBGIT2LIB="
598 (assoc-ref inputs "libgit2") "/lib\n")))
599 ;; This file checks for old versions of Boost, insisting on
600 ;; having us download the boost sources and placing them in the
602 (substitute* "pri/utils.pri"
603 (("error\\(") "message("))
605 (let ((out (assoc-ref outputs "out")))
607 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib")
608 (string-append "PREFIX=" out)
612 ("qtserialport" ,qtserialport)
621 (url "https://github.com/fritzing/fritzing-parts.git")
623 (file-name (git-file-name "fritzing-parts" version))
626 "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
627 (home-page "http://fritzing.org")
628 (synopsis "Electronic circuit design")
630 "The Fritzing application is @dfn{Electronic Design Automation} (EDA)
631 software with a low entry barrier, suited for the needs of makers and
632 hobbyists. It offers a unique real-life \"breadboard\" view, and a parts
633 library with many commonly used high-level components. Fritzing makes it very
634 easy to communicate about circuits, as well as to turn them into PCB layouts
635 ready for production.")
636 ;; Documentation and parts are released under CC-BY-SA 3.0; source code is
637 ;; released under GPLv3+.
638 (license (list license:gpl3+ license:cc-by-sa3.0))))
646 (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-"
647 version "/gerbv-" version ".tar.gz"))
650 "1d2k43k7i4yvbpi4sw1263a8d0q98z2n7aqhmpinpkih8a681vn5"))))
651 (build-system gnu-build-system)
653 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
654 ("pkg-config" ,pkg-config)))
658 ("desktop-file-utils" ,desktop-file-utils)))
659 (home-page "http://gerbv.geda-project.org/")
660 (synopsis "Gerber file viewer")
662 "Gerbv is a viewer for files in the Gerber format (RS-274X only), which
663 is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets
664 you load several files on top of each other, do measurements on the displayed
665 image, etc. Besides viewing Gerbers, you may also view Excellon drill files
666 as well as pick-place files.")
667 (license license:gpl2+)))
669 (define-public translate2geda
670 ;; There has been no formal release yet.
671 (let ((commit "4c19e7eefa338cea8f1ee999ea8b37f8d0698169")
674 (name "translate2geda")
675 (version (git-version "0" revision commit))
679 (url "https://github.com/erichVK5/translate2geda.git")
681 (file-name (git-file-name name version))
684 "1h062bbpw8nk0jamkya1k4lsgaia796jyviiz2gkdi6k1bxhwgpa"))))
685 (build-system ant-build-system)
687 `(#:tests? #f ; there are no tests
688 #:jar-name "translate2geda.jar"
690 #:main-class "translate2geda"
692 (modify-phases %standard-phases
693 (add-after 'install 'install-bin
694 (lambda* (#:key inputs outputs #:allow-other-keys)
695 (let* ((out (assoc-ref outputs "out"))
696 (bin (string-append out "/bin"))
697 (wrapper (string-append bin "/translate2geda")))
699 (with-output-to-file wrapper
701 (format #t "#!/bin/sh~%exec ~a -jar ~a/share/java/translate2geda.jar"
702 (which "java") out)))
703 (chmod wrapper #o555))
705 (home-page "https://github.com/erichVK5/translate2geda")
706 (synopsis "Utility for converting symbol and footprint formats to gEDA")
708 "This package provides a utility for converting Kicad (@file{.mod},
709 @file{.lib}), Eagle (@file{.lbr}), gerber (@file{.gbr}, etc..),
710 BXL (@file{.bxl}), IBIS (@file{.ibs}), symdef, LT-Spice (@file{.asc}),
711 QUCS (@file{.sch}), and BSDL (@file{.bsd}) symbols and footprints and EggBot
713 (license license:gpl2+))))
715 (define-public libfive
716 (let ((commit "9d857d1923abecb0e5935b9287d22661f6efaac5")
720 (version (git-version "0" revision commit))
724 (url "https://github.com/libfive/libfive")
728 "1r40kyx30wz31cwwlfvfh7fgqkxq3n8dxhswpi9qpf4r5h3l8wsn"))
729 (file-name (git-file-name name version))
731 ;; Remove bundled catch since we provide our own.
733 (delete-file "libfive/test/catch.hpp")
735 (build-system cmake-build-system)
737 `(#:test-target "libfive-test"
739 (modify-phases %standard-phases
740 (add-after 'unpack 'remove-native-compilation
742 (substitute* "CMakeLists.txt" (("-march=native") ""))
745 `(("pkg-config" ,pkg-config)))
748 ("catch" ,catch-framework)
752 ("guile" ,guile-2.2)))
753 (home-page "https://libfive.com")
754 (synopsis "Tool for programmatic computer-aided design")
756 "Libfive is a tool for programmatic computer-aided design (CAD). In
757 libfive, solid models are defined as Scheme scripts, and there are no opaque
758 function calls into the geometry kernel: everything is visible to the user.
759 Even fundamental, primitive shapes are represented as code in the user-level
761 (license (list license:lgpl2.1+ ;library
762 license:gpl2+))))) ;Guile bindings and GUI
765 (deprecated-package "ao-cad" libfive))
774 (file-name (string-append name "-" version ".tar.xz"))
776 "https://launchpad.net/kicad/" (version-major+minor version)
777 "/" version "/+download/kicad-" version ".tar.xz"))
779 (base32 "10605rr10x0353n6yk2z095ydnkd1i6j1ncbq64pfxdn5vkhcd1g"))))
780 (build-system cmake-build-system)
782 `(#:out-of-source? #t
783 #:tests? #f ; no tests
784 #:build-type "Release"
786 (list "-DKICAD_STABLE_VERSION=ON"
787 "-DKICAD_REPO_NAME=stable"
788 "-DKICAD_SKIP_BOOST=ON"; Use our system's boost library.
789 "-DKICAD_SCRIPTING=ON"
790 "-DKICAD_SCRIPTING_MODULES=ON"
791 "-DKICAD_SCRIPTING_WXPYTHON=ON"
792 ;; Has to be set explicitly, as we don't have the wxPython
793 ;; headers in the wxwidgets store item, but in wxPython.
794 (string-append "-DCMAKE_CXX_FLAGS=-I"
795 (assoc-ref %build-inputs "wxpython")
797 ,(version-major+minor
798 (package-version python2-wxpython)))
799 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
801 ;; TODO: Enable this when CA certs are working with curl.
802 "-DBUILD_GITHUB_PLUGIN=OFF")
804 (modify-phases %standard-phases
805 (add-after 'unpack 'adjust-boost-include
807 ;; The location of this header changed in Boost 1.66.
808 (substitute* "3d-viewer/3d_cache/3d_cache.cpp"
809 (("boost/uuid/sha1\\.hpp")
810 "boost/uuid/detail/sha1.hpp"))
812 (add-after 'install 'wrap-program
813 ;; Ensure correct Python at runtime.
814 (lambda* (#:key inputs outputs #:allow-other-keys)
815 (let* ((out (assoc-ref outputs "out"))
816 (python (assoc-ref inputs "python"))
817 (file (string-append out "/bin/kicad"))
821 ,(version-major+minor
822 (package-version python))
824 (getenv "PYTHONPATH"))))
826 `("PYTHONPATH" ":" prefix (,path))
828 (,(string-append python "/bin:")))))
832 ("gettext" ,gnu-gettext)
833 ("pkg-config" ,pkg-config)
839 ("desktop-file-utils" ,desktop-file-utils)
842 ("hicolor-icon-theme" ,hicolor-icon-theme)
843 ("libngspice" ,libngspice)
846 ("opencascade-oce" ,opencascade-oce)
849 ("wxwidgets" ,wxwidgets-gtk2)
850 ("wxpython" ,python2-wxpython)))
851 (home-page "http://kicad-pcb.org/")
852 (synopsis "Electronics Design Automation Suite")
853 (description "Kicad is a program for the formation of printed circuit
854 boards and electrical circuits. The software has a number of programs that
855 perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing
856 electrical diagrams), gerbview (viewing Gerber files) and others.")
857 (license license:gpl3+)))
859 (define-public kicad-library
860 (let ((version "4.0.7"))
862 (name "kicad-library")
868 "https://kicad-downloads.s3.cern.ch/libraries/kicad-library-"
871 (base32 "1azb7v1y3l6j329r9gg7f4zlg0wz8nh4s4i5i0l9s4yh9r6i9zmv"))))
872 (build-system cmake-build-system)
874 `(#:out-of-source? #t
875 #:tests? #f ; no tests
877 (modify-phases %standard-phases
878 (add-after 'install 'install-footprints ; from footprints tarball
879 (lambda* (#:key inputs outputs #:allow-other-keys)
881 (assoc-ref inputs "kicad-footprints")
882 "-C" (string-append (assoc-ref outputs "out")
883 "/share/kicad/modules")
884 "--strip-components=1")))
885 ;; We change the default global footprint file, which is generated if
886 ;; it doesn't exist in user's home directory, from the one using the
887 ;; github plugin, to the one using the KISYSMOD environment path.
888 (add-after 'install-footprints 'use-pretty-footprint-table
889 (lambda* (#:key outputs #:allow-other-keys)
890 (let* ((out (assoc-ref outputs "out"))
891 (template-dir (string-append out "/share/kicad/template"))
892 (fp-lib-table (string-append template-dir "/fp-lib-table")))
893 (delete-file fp-lib-table)
894 (copy-file (string-append fp-lib-table ".for-pretty")
898 (list (search-path-specification
899 (variable "KISYSMOD") ; footprint path
900 (files '("share/kicad/modules")))
901 (search-path-specification
902 (variable "KISYS3DMOD") ; 3D model path
903 (files '("share/kicad/modules/packages3d")))))
904 ;; Kicad distributes footprints in a separate tarball.
906 `(("kicad-footprints"
910 "http://downloads.kicad-pcb.org/libraries/kicad-footprints-"
914 "08qrz5zzsb5127jlnv24j0sgiryd5nqwg3lfnwi8j9a25agqk13j"))))))
915 (home-page "http://kicad-pcb.org/")
916 (synopsis "Libraries for kicad")
917 (description "This package provides Kicad component, footprint and 3D
918 render model libraries.")
919 (license license:lgpl2.0+))))
921 (define-public kicad-symbols
923 (name "kicad-symbols")
928 (url "https://github.com/KiCad/kicad-symbols.git")
930 (file-name (git-file-name name version))
933 "1rjh2pjcrc3bhcgyyskj5pssm7vffrjk0ymwr70fb7sjpmk96yjk"))))
934 (build-system cmake-build-system)
936 `(#:tests? #f)) ; No tests exist
937 (home-page "http://kicad-pcb.org/")
938 (synopsis "Official KiCad schematic symbol libraries for KiCad 5")
939 (description "This package contains the official KiCad schematic symbol
940 libraries for KiCad 5.")
941 ;; TODO: Exception: "To the extent that the creation of electronic designs that use 'Licensed Material' can be considered to be 'Adapted Material', then the copyright holder waives article 3 of the license with respect to these designs and any generated files which use data provided as part of the 'Licensed Material'."
942 ;; See <https://github.com/KiCad/kicad-symbols/blob/master/LICENSE.md>.
943 (license license:cc-by-sa4.0)))
945 (define-public linsmith
952 "mirror://sourceforge/linsmith/linsmith/linsmith-"
953 version "/linsmith-" version ".tar.gz"))
956 "13qj7n9826qc9shkkgd1p6vcpj78v4h9d67wbg45prg7rbnzkzds"))))
957 (build-system gnu-build-system)
959 `(("pkg-config" ,pkg-config)
961 ("libgnome" ,libgnomeui)))
962 (home-page "https://jcoppens.com/soft/linsmith/index.en.php")
963 (synopsis "Smith Charting program")
964 (description "LinSmith is a Smith Charting program, mainly designed for
965 educational use. As such, there is an emphasis on capabilities that improve
966 the 'showing the effect of'-style of operation.")
967 (license license:gpl2+)))
976 (uri (string-append "http://libvolk.org/releases/volk-"
980 "1bz3ywc6y5wmz3i8p4z2wbzhns8bc0ywdkl9qnxpcvfcscarbdlh"))))
981 (build-system cmake-build-system)
985 `(("python-2" ,python-2)
986 ("python2-cheetah" ,python2-cheetah)))
987 (home-page "http://libvolk.org/")
988 (synopsis "Vector-Optimized Library of Kernels")
990 "@code{volk} contains procedures with machine-specific optimizations
991 for mathematical functions. It also provides an machine-independent
992 interface to select the best such procedures to use on a given system.")
993 (license license:gpl3+)))
995 (define-public minicom
1002 (uri (string-append "https://alioth.debian.org/frs/download.php/"
1003 "file/4215/" name "-" version ".tar.gz"))
1006 "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk"))))
1007 (build-system gnu-build-system)
1009 `(#:configure-flags '("--enable-lock-dir=/var/lock")
1011 (modify-phases %standard-phases
1012 (add-after 'unpack 'patch-lock-check
1014 (substitute* "configure"
1015 (("test -d [$]UUCPLOCK") "true"))
1018 `(("ncurses" ,ncurses)))
1019 (home-page "https://alioth.debian.org/projects/minicom/")
1020 (synopsis "Serial terminal emulator")
1021 (description "@code{minicom} is a serial terminal emulator.")
1022 (license license:gpl2+)))
1024 (define-public harminv
1031 (string-append "https://github.com/stevengj/harminv/"
1032 "releases/download/v" version "/"
1033 name "-" version ".tar.gz"))
1036 "0w1n4d249vlpda0hi6z1v13qp21vlbp3ykn0m8qg4rd5132j7fg1"))))
1037 (build-system gnu-build-system)
1039 `(#:configure-flags '("--enable-shared")
1041 (modify-phases %standard-phases
1042 (add-before 'configure 'fix-tests
1044 (substitute* "./sines-test.sh"
1045 ; change test frequency range - default fails
1046 (("0\\.15") "0.16"))
1049 `(("fortran" ,gfortran)))
1051 `(("lapack" ,lapack)))
1052 (home-page "https://github.com/stevengj/harminv")
1053 (synopsis "Harmonic inversion solver")
1055 "Harminv is a free program (and accompanying library) to solve the problem of
1056 harmonic inversion — given a discrete-time, finite-length signal that consists of a sum
1057 of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
1058 determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
1059 (license license:gpl2+)))
1061 (define-public guile-libctl
1063 (name "guile-libctl")
1069 "https://github.com/NanoComp/libctl/releases/download/v"
1070 version "/libctl-" version ".tar.gz"))
1073 "0x8r56lpfq83kfbq28vr25icl19xpfd6fjrxzcpdmv30l9pash83"))))
1074 (build-system gnu-build-system)
1076 `(#:configure-flags '("--enable-shared")))
1078 `(("fortran" ,gfortran)))
1080 `(("guile" ,guile-2.2)))
1081 (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl")
1082 (synopsis "Flexible control files implementation for scientific simulations")
1084 "Libctl is a Guile-based library implementing flexible control files
1085 for scientific simulations.")
1086 (license license:gpl2+)))
1096 "https://github.com/NanoComp/mpb/releases/download/v"
1097 version "/mpb-" version ".tar.gz"))
1100 "1jgrb7dd6qs6j6y1gnxmdgrh79l2bvqa6nk60a4pw1annsks4brd"))))
1101 (build-system gnu-build-system)
1104 (list (string-append "--with-libctl="
1105 (assoc-ref %build-inputs "libctl")
1107 "--enable-shared")))
1109 `(("fortran" ,gfortran)
1110 ("pkg-config" ,pkg-config)
1115 ("guile" ,guile-2.2)
1118 ("libctl" ,guile-libctl)
1119 ("readline" ,readline)
1121 (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands")
1122 (synopsis "Computes band structures and electromagnetic modes of dielectric
1125 "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes)
1126 of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
1127 fully-vectorial and three-dimensional methods.")
1128 (license license:gpl2+)))
1138 "https://github.com/NanoComp/meep/releases/download/v"
1139 version "/meep-" version ".tar.gz"))
1142 "14zyxmm3p80j5fz5b89sl7hgkgcisqjny5hjh4pi274ziqjqz8bm"))))
1143 (build-system gnu-build-system)
1146 (list (string-append "--with-libctl="
1147 (assoc-ref %build-inputs "libctl")
1150 `(("fortran" ,gfortran)
1151 ("pkg-config" ,pkg-config)
1156 ("guile" ,guile-2.2)
1157 ("harminv" ,harminv)
1160 ("libctl" ,guile-libctl)
1163 (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep")
1164 (synopsis "Finite-difference time-domain (FDTD) simulation software")
1166 "Meep is a finite-difference time-domain (FDTD) simulation software package
1167 developed at MIT to model electromagnetic systems.")
1168 (license license:gpl2+)))
1178 "mirror://sourceforge/mot-adms/adms-source/"
1179 (version-major+minor version) "/adms-" version ".tar.gz"))
1182 "1rn98l6jxcjhi6ai5f7p588khra9z80m0m0lql4n4sb7773fh1vk"))))
1183 (build-system gnu-build-system)
1187 (home-page "https://sourceforge.net/projects/mot-adms")
1188 (synopsis "Automatic device model synthesizer")
1190 "ADMS is a code generator that converts electrical compact device models
1191 specified in high-level description language into ready-to-compile C code for
1192 the API of spice simulators. Based on transformations specified in XML
1193 language, ADMS transforms Verilog-AMS code into other target languages.")
1194 (license license:gpl3)))
1196 (define-public capstone
1202 (uri (string-append "https://github.com/aquynh/capstone/archive/"
1204 (file-name (string-append name "-" version ".tar.gz"))
1207 "1wbd1g3r32ni6zd9vwrq3kn7fdp9y8qwn9zllrrbk8n5wyaxcgci"))))
1208 (build-system gnu-build-system)
1211 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1214 (modify-phases %standard-phases
1215 (delete 'configure) ; no configure script
1216 ;; cstool's Makefile ‘+=’s LDFLAGS, so we cannot pass it as a make flag.
1217 (add-before 'build 'fix-cstool-ldflags
1218 (lambda* (#:key outputs #:allow-other-keys)
1219 (setenv "LDFLAGS" (string-append "-Wl,-rpath="
1220 (assoc-ref outputs "out") "/lib"))
1222 (home-page "https://www.capstone-engine.org")
1223 (synopsis "Lightweight multi-platform, multi-architecture disassembly framework")
1225 "Capstone is a lightweight multi-platform, multi-architecture disassembly
1226 framework. Capstone can disassemble machine code for many supported architectures
1227 such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and xcore. It provides
1228 bindings for Python, Java, OCaml and more.")
1229 (license license:bsd-3)))
1231 ;; FIXME: This package has a timestamp embedded in
1232 ;; lib/python3.5/site-packages/capstone/__pycache__/__iti__.cpython-35.pyc
1233 (define-public python-capstone
1236 (name "python-capstone")
1238 `(("capstone" ,capstone)))
1239 (build-system python-build-system)
1242 (modify-phases %standard-phases
1243 (add-after 'unpack 'chdir-and-fix-setup-py
1245 (chdir "bindings/python")
1246 ;; Do not build the library again, because we already have it.
1247 (substitute* "setup.py" ((".* build_libraries.*") ""))
1248 ;; This substitution tells python-capstone where to find the
1250 (substitute* "capstone/__init__.py"
1251 (("pkg_resources.resource_filename.*")
1252 (string-append "'" (assoc-ref %build-inputs "capstone") "/lib',\n")))
1255 (define-public python2-capstone
1256 (package-with-python2 python-capstone))
1258 (define-public radare2
1264 (uri (string-append "https://radare.mikelloc.com/get/" version "/"
1265 "radare2-" version ".tar.gz"))
1268 "174x5545fw2nyf000gd46hi7rx2bn3bw5bsnvizn9yi99pn7m4mw"))
1269 (modules '((guix build utils)))
1272 (substitute* "libr/asm/p/Makefile"
1273 (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) "))
1274 (substitute* "libr/parse/p/Makefile"
1275 (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) "))
1276 (substitute* "libr/bin/p/Makefile"
1277 (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) "))
1279 (build-system gnu-build-system)
1281 '(#:tests? #f ; tests require git and network access
1283 (modify-phases %standard-phases
1284 (add-before 'configure 'mklibdir
1285 (lambda* (#:key inputs #:allow-other-keys)
1286 (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))
1289 (list "--with-sysmagic" "--with-syszip" "--with-openssl"
1290 "--without-nonpic" "--with-rpath" "--with-syscapstone")
1294 `(("openssl" ,openssl)
1297 ("capstone" ,capstone)))
1299 `(("pkg-config" ,pkg-config)))
1300 (home-page "https://radare.org/")
1301 (synopsis "Portable reversing framework")
1303 "Radare project started as a forensics tool, a scriptable commandline
1304 hexadecimal editor able to open disk files, but later support for analyzing
1305 binaries, disassembling code, debugging programs, attaching to remote gdb
1307 (license license:lgpl3)))
1315 (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
1319 "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
1320 (build-system gnu-build-system)
1322 `(#:tests? #f ; no tests
1323 #:make-flags '("all" "asco-mpi")
1325 (modify-phases %standard-phases
1327 (add-before 'build 'fix-paths
1328 (lambda* (#:key inputs #:allow-other-keys)
1329 (let ((coreutils (assoc-ref inputs "coreutils-minimal")))
1330 (substitute* '("errfunc.c" "asco.c")
1332 (string-append coreutils "/bin/cp "))
1334 (string-append coreutils "/bin/nice")))
1335 (substitute* "Makefile"
1336 (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
1338 (replace 'install ; no install target
1339 (lambda* (#:key outputs #:allow-other-keys)
1340 (for-each (lambda (file)
1341 (install-file file (string-append
1342 (assoc-ref outputs "out")
1344 '("asco" "asco-mpi" "asco-test"
1345 "tools/alter/alter" "tools/log/log"))
1348 `(("mpi" ,openmpi)))
1350 `(("coreutils-minimal" ,coreutils-minimal)))
1351 (home-page "http://asco.sourceforge.net/")
1352 (synopsis "SPICE circuit optimizer")
1354 "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
1355 high-performance parallel differential evolution (DE) optimization algorithm.")
1356 (license license:gpl2+)))
1358 (define-public libngspice
1359 ;; Note: The ngspice's build system does not allow us to build both the
1360 ;; library and the executables in one go. Thus, we have two packages.
1361 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>.
1367 (uri (string-append "mirror://sourceforge/ngspice/ng-spice-rework/"
1368 version "/ngspice-" version ".tar.gz"))
1371 "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l"))
1372 (modules '((guix build utils)))
1373 ;; We remove the non-free cider and build without it.
1376 (delete-file-recursively "src/ciderlib")
1377 (delete-file "src/ciderinit")
1378 (substitute* "configure"
1379 (("src/ciderlib/Makefile") "")
1380 (("src/ciderlib/input/Makefile") "")
1381 (("src/ciderlib/support/Makefile") "")
1382 (("src/ciderlib/oned/Makefile") "")
1383 (("src/ciderlib/twod/Makefile") ""))
1385 (build-system gnu-build-system)
1387 `(;; No tests for libngspice exist.
1388 ;; The transient tests for ngspice fail.
1391 (modify-phases %standard-phases
1392 (add-after 'unpack 'patch-timestamps
1394 (substitute* "configure"
1395 (("`date`") "Thu Jan 1 00:00:01 UTC 1970"))
1397 (add-after 'unpack 'delete-program-manuals
1399 (substitute* "man/man1/Makefile.in"
1400 (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1 ngmultidec\\.1")
1403 (add-after 'install 'delete-script-files
1404 (lambda* (#:key outputs #:allow-other-keys)
1405 (delete-file-recursively
1406 (string-append (assoc-ref outputs "out")
1407 "/share/ngspice/scripts")))))
1409 (list "--enable-openmp"
1412 "--with-readline=yes")))
1417 `(("libxaw" ,libxaw)
1419 ("readline" ,readline)))
1420 (home-page "http://ngspice.sourceforge.net/")
1421 (synopsis "Mixed-level/mixed-signal circuit simulator")
1423 "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes
1424 @code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that
1425 provides code modeling support and simulation of digital components through
1426 an embedded event driven algorithm.")
1427 (license (list license:lgpl2.0+ ; code in frontend/numparam
1428 (license:non-copyleft "file:///COPYING") ; spice3 bsd-style
1429 license:public-domain)))) ; xspice
1431 (define-public ngspice
1432 ;; The ngspice executables (see libngpsice above.)
1433 (package (inherit libngspice)
1436 (substitute-keyword-arguments (package-arguments libngspice)
1437 ((#:configure-flags flags)
1438 `(delete "--with-ngshared" ,flags))
1440 `(modify-phases ,phases
1441 (add-after 'unpack 'delete-include-files
1443 (substitute* "src/Makefile.in"
1444 (("^SUBDIRS = misc maths frontend spicelib include/ngspice")
1445 "SUBDIRS = misc maths frontend spicelib"))
1447 (add-after 'install 'delete-cmpp-dlmain
1448 (lambda* (#:key outputs #:allow-other-keys)
1449 (for-each (lambda (file)
1451 (string-append (assoc-ref outputs "out")
1453 '("/bin/cmpp" "/share/ngspice/dlmain.c"))
1455 (delete 'delete-program-manuals)
1456 (delete 'delete-script-files)))))
1458 `(("libngspice" ,libngspice)
1459 ("readline" ,readline)))))
1461 (define trilinos-serial-xyce
1462 ;; Note: This is a Trilinos containing only the packages Xyce needs, so we
1463 ;; keep it private. See
1464 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#248>.
1465 ;; TODO: Remove when we have modular Trilinos packages?
1467 (name "trilinos-serial-xyce")
1470 (origin (method url-fetch)
1471 (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
1472 version "-Source.tar.gz"))
1475 "1zgrcksrcbmyy79mbdv0j4j4sh0chpigxk8vcrrwgaxyxwxxhrvw"))))
1476 (build-system cmake-build-system)
1478 `(#:out-of-source? #t
1480 (modify-phases %standard-phases
1481 ;; Delete unneeded tribits(build system) directory which makes validate-runpath
1483 (add-before 'validate-runpath 'delete-tribits
1484 (lambda* (#:key outputs #:allow-other-keys)
1485 (delete-file-recursively
1486 (string-append (assoc-ref outputs "out")
1487 "/lib/cmake/tribits"))
1490 (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
1491 "-DCMAKE_C_FLAGS=-O3 -fPIC"
1492 "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
1493 "-DTrilinos_ENABLE_NOX=ON"
1494 "-DNOX_ENABLE_LOCA=ON"
1495 "-DTrilinos_ENABLE_EpetraExt=ON"
1496 "-DEpetraExt_BUILD_BTF=ON"
1497 "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
1498 "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
1499 "-DTrilinos_ENABLE_TrilinosCouplings=ON"
1500 "-DTrilinos_ENABLE_Ifpack=ON"
1501 "-DTrilinos_ENABLE_Isorropia=ON"
1502 "-DTrilinos_ENABLE_AztecOO=ON"
1503 "-DTrilinos_ENABLE_Belos=ON"
1504 "-DTrilinos_ENABLE_Teuchos=ON"
1505 "-DTeuchos_ENABLE_COMPLEX=ON"
1506 "-DTrilinos_ENABLE_Amesos=ON"
1507 "-DAmesos_ENABLE_KLU=ON"
1508 "-DAmesos_ENABLE_UMFPACK=ON"
1509 "-DTrilinos_ENABLE_Sacado=ON"
1510 "-DTrilinos_ENABLE_Kokkos=OFF"
1511 "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
1512 "-DTPL_ENABLE_AMD=ON"
1513 "-DTPL_ENABLE_UMFPACK=ON"
1514 "-DTPL_ENABLE_BLAS=ON"
1515 "-DTPL_ENABLE_LAPACK=ON")))
1517 `(("fortran" ,gfortran)
1522 ("suitesparse" ,suitesparse)))
1523 (home-page "https://trilinos.org")
1524 (synopsis "Engineering and scientific problems algorithms")
1526 "The Trilinos Project is an effort to develop algorithms and enabling
1527 technologies within an object-oriented software framework for the solution of
1528 large-scale, complex multi-physics engineering and scientific problems. A
1529 unique design feature of Trilinos is its focus on packages.")
1530 (license (list license:lgpl2.1+
1533 (define-public xyce-serial
1535 (name "xyce-serial")
1538 (origin (method url-fetch)
1539 (uri (string-append "https://archive.org/download/Xyce-"
1540 version "/Xyce-" version ".tar.gz"))
1543 "09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
1544 (build-system gnu-build-system)
1549 "CXXFLAGS=-O3 -std=c++11"
1550 (string-append "ARCHDIR="
1551 (assoc-ref %build-inputs "trilinos")))))
1553 `(("bison" ,bison-3.0) ;'configure' fails with Bison 3.4
1555 ("fortran" ,gfortran)))
1558 ("suitesparse" ,suitesparse)
1560 ("trilinos" ,trilinos-serial-xyce)))
1561 (home-page "https://xyce.sandia.gov/")
1562 (synopsis "High-performance analog circuit simulator")
1564 "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
1565 capable of solving extremely large circuit problems by supporting large-scale
1566 parallel computing platforms. It also supports serial execution.")
1567 (license license:gpl3+)))
1569 (define trilinos-parallel-xyce
1570 (package (inherit trilinos-serial-xyce)
1571 (name "trilinos-parallel-xyce")
1573 `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
1574 ((#:configure-flags flags)
1575 `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
1576 "-DTrilinos_ENABLE_Zoltan=ON"
1577 "-DTPL_ENABLE_MPI=ON")
1581 ,@(package-inputs trilinos-serial-xyce)))))
1583 (define-public xyce-parallel
1584 (package (inherit xyce-serial)
1585 (name "xyce-parallel")
1587 `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
1588 ((#:configure-flags flags)
1589 `(list "CXXFLAGS=-O3 -std=c++11"
1596 (assoc-ref %build-inputs "trilinos")))))))
1598 `(("mpi" ,openmpi)))
1600 `(("trilinos" ,trilinos-parallel-xyce)
1601 ,@(alist-delete "trilinos"
1602 (package-inputs xyce-serial))))))
1604 (define-public freehdl
1610 (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
1614 "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))))
1615 (build-system gnu-build-system)
1618 (modify-phases %standard-phases
1619 (add-before 'configure 'patch-pkg-config
1620 (lambda* (#:key inputs #:allow-other-keys)
1621 (substitute* "freehdl/freehdl-config"
1623 (string-append (assoc-ref inputs "pkg-config")
1626 (string-append (assoc-ref inputs "coreutils")
1629 (add-after 'patch-pkg-config 'setenv
1630 (lambda* (#:key inputs #:allow-other-keys)
1631 (setenv "CXX" (string-append (assoc-ref inputs "gcc")
1633 (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
1636 (add-after 'setenv 'patch-gvhdl
1638 (substitute* "v2cc/gvhdl.in"
1639 (("--mode=link") "--mode=link --tag=CXX")
1640 (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
1642 (add-after 'patch-gvhdl 'patch-freehdl-gennodes
1643 (lambda* (#:key inputs #:allow-other-keys)
1644 (substitute* "freehdl/freehdl-gennodes.in"
1646 (string-append (assoc-ref inputs "guile") "/bin/guile"))
1647 (("\\(debug") ";(debug")
1648 (("\\(@ ") "(apply-emit")
1649 (("\\(@@ ") "(apply-mini-format"))
1651 (add-after 'configure 'patch-freehdl-pc
1652 (lambda* (#:key inputs #:allow-other-keys)
1653 (substitute* "freehdl.pc"
1655 (string-append "=" (assoc-ref inputs "gcc-toolchain")
1658 (string-append "=" (assoc-ref inputs "libtool")
1661 (add-after 'install-scripts 'make-wrapper
1662 (lambda* (#:key inputs outputs #:allow-other-keys)
1663 (let ((out (assoc-ref outputs "out")))
1664 ;; 'gvhdl' invokes the C compiler directly, so hard-code its
1666 (wrap-program (string-append out "/bin/gvhdl")
1667 `("CPLUS_INCLUDE_PATH" ":" prefix
1668 (,(string-append (assoc-ref inputs "gcc-toolchain")
1670 `("LIBRARY_PATH" ":" prefix
1671 (,(string-append (assoc-ref inputs "gcc-toolchain")
1674 (,(string-append (assoc-ref inputs "gcc-toolchain")
1676 ,(string-append (assoc-ref inputs "coreutils")
1678 (wrap-program (string-append out "/bin/freehdl-config")
1679 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
1682 `(("coreutils" ,coreutils)
1683 ("gcc-toolchain" ,gcc-toolchain)
1684 ("guile" ,guile-2.2)
1686 ("pkg-config" ,pkg-config)
1687 ("libtool" ,libtool)))
1689 `(("pkg-config-native" ,pkg-config)
1690 ("libtool-native" ,libtool)))
1691 (home-page "http://www.freehdl.seul.org/")
1692 (synopsis "VHDL simulator")
1694 "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
1695 VHDL'93 as well as VHDL'87 standards are supported.")
1696 (license (list license:gpl2+
1697 license:lgpl2.0+)))) ; freehdl's libraries
1700 ;; Qucs 0.0.19 segfaults when using glibc-2.26. Temporarily build from git.
1701 ;; TODO: When qucs-0.0.20 is released, revert the commit that introduced this
1702 ;; comment and update the package.
1703 (let ((commit "b4f27d9222568066cd59e4c387c51a35056c99d8")
1707 (version (git-version "0.0.19" revision commit))
1711 (url "https://github.com/Qucs/qucs")
1714 (base32 "10bclay9xhkffmsh4j4l28kj1qpxx0pnxja5vx6305cllnq4r3gb"))
1715 (file-name (string-append name "-" version "-checkout"))))
1716 (build-system gnu-build-system)
1719 (modify-phases %standard-phases
1720 (add-before 'bootstrap 'patch-bootstrap
1722 (for-each patch-shebang
1725 "qucs-doc/bootstrap"
1726 "qucs-core/bootstrap"))
1728 (add-before 'configure 'patch-configure
1729 (lambda* (#:key inputs #:allow-other-keys)
1730 (substitute* "qucs/configure"
1731 (("\\$QTDIR") (assoc-ref inputs "qt4")))
1733 (add-after 'patch-configure 'patch-scripts
1734 (lambda* (#:key inputs outputs #:allow-other-keys)
1735 (substitute* '("qucs/qucs/qucsdigi"
1736 "qucs/qucs/qucsdigilib"
1737 "qucs/qucs/qucsveri")
1739 (string-append (assoc-ref outputs "out") "/bin"))
1741 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
1743 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
1745 (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
1747 (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
1749 (string-append (assoc-ref inputs "sed") "/bin/sed"))
1751 (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
1753 (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
1755 (add-before 'check 'pre-check
1757 ;; The test suite requires a running X server.
1758 (system "Xvfb :1 &")
1759 (setenv "DISPLAY" ":1")
1761 (add-after 'install 'make-wrapper
1762 (lambda* (#:key inputs outputs #:allow-other-keys)
1763 (let ((out (assoc-ref outputs "out")))
1764 ;; 'qucs' directly invokes gcc, hence this wrapping.
1765 (wrap-program (string-append out "/bin/qucs")
1766 `("CPLUS_INCLUDE_PATH" ":" prefix
1767 (,(string-append (assoc-ref inputs "gcc-toolchain")
1770 (,(string-append (assoc-ref inputs "gcc-toolchain")
1772 `("LIBRARY_PATH" ":" prefix
1773 (,(string-append (assoc-ref inputs "gcc-toolchain")
1775 `("ADMSXMLBINDIR" ":" prefix
1776 (,(string-append (assoc-ref inputs "adms") "/bin")))
1777 `("ASCOBINDIR" ":" prefix
1778 (,(string-append (assoc-ref inputs "asco") "/bin")))
1779 `("QUCS_OCTAVE" ":" prefix
1780 (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
1782 #:parallel-build? #f ; race condition
1783 #:configure-flags '("--disable-doc"))) ; we need octave-epstk
1785 `(("autoconf" ,autoconf)
1786 ("automake" ,automake)
1790 ("libtool-native" ,libtool)
1791 ("pkg-config" ,pkg-config)
1792 ("python" ,python-2) ; for tests
1793 ("matplotlib" ,python2-matplotlib) ; for tests
1794 ("numpy" ,python2-numpy) ; for tests
1795 ("xorg-server" ,xorg-server))) ; for tests
1799 ("coreutils" ,coreutils)
1800 ("freehdl" ,freehdl)
1801 ("gcc-toolchain" ,gcc-toolchain)
1802 ("iverilog" ,iverilog)
1803 ("libtool" ,libtool)
1804 ("octave" ,octave-cli)
1807 (home-page "http://qucs.sourceforge.net/")
1808 (synopsis "Circuit simulator with graphical user interface")
1810 "Qucs is a circuit simulator with graphical user interface. The software
1811 aims to support all kinds of circuit simulation types---e.g. DC, AC,
1812 S-parameter, transient, noise and harmonic balance analysis. Pure digital
1813 simulations are also supported.")
1814 (license license:gpl2+))))
1816 (define-public qucs-s
1822 (uri (string-append "https://github.com/ra3xdh/qucs_s/archive/"
1824 (file-name (string-append name "-" version ".tar.gz"))
1827 "12m1jwhb9qwvb141qzyskbxnw3wn1x22d02z4b4862p7xvccl5h7"))))
1828 (build-system cmake-build-system)
1830 `(#:tests? #f ; no tests
1832 (modify-phases %standard-phases
1833 (add-before 'configure 'patch-scripts
1834 (lambda* (#:key inputs #:allow-other-keys)
1835 (substitute* '("qucs/qucsdigi"
1839 (string-append (assoc-ref inputs "qucs") "/bin"))
1841 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
1843 (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
1845 (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
1847 (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
1849 (string-append (assoc-ref inputs "sed") "/bin/sed"))
1851 (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
1853 (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
1855 (add-after 'patch-scripts 'patch-paths
1856 (lambda* (#:key inputs #:allow-other-keys)
1857 (substitute* "qucs/main.cpp"
1858 (((string-append "QucsSettings\\.Qucsator = QucsSettings\\.BinDir "
1859 "\\+ \"qucsator\" \\+ executableSuffix"))
1860 (string-append "}{ QucsSettings.Qucsator = \""
1861 (assoc-ref inputs "qucs") "/bin/qucsator\""))
1862 (((string-append "QucsSettings\\.XyceExecutable = "
1863 "\"/usr/local/Xyce-Release-6.8.0-OPENSOURCE/bin/Xyce"))
1864 (string-append "}{ QucsSettings.XyceExecutable = \""
1865 (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
1866 (((string-append "else QucsSettings\\.XyceParExecutable = "
1867 "\"mpirun -np %p /usr/local"
1868 "/Xyce-Release-6.8.0-OPENMPI-OPENSOURCE/bin/Xyce"))
1869 (string-append "QucsSettings.XyceParExecutable = \""
1870 (assoc-ref inputs "mpi") "/bin/mpirun -np %p "
1871 (assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
1872 (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
1873 (string-append "QucsSettings.NgspiceExecutable = " "\""
1874 (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
1875 (substitute* "qucs/extsimkernels/ngspice.cpp"
1876 (("share/qucs/xspice_cmlib") "share/qucs-s/xspice_cmlib"))
1877 (substitute* "qucs/qucs_actions.cpp"
1879 (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
1881 (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
1883 (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
1885 (add-after 'install 'install-scripts
1886 (lambda* (#:key inputs outputs #:allow-other-keys)
1889 (let ((file (string-append "../qucs_s-" ,version
1891 (out (assoc-ref outputs "out")))
1892 (install-file file (string-append out "/bin"))
1893 (chmod (string-append out "/bin/" script) #o555)))
1894 '("qucsdigi" "qucsdigilib" "qucsveri"))
1896 (add-after 'install-scripts 'make-wrapper
1897 (lambda* (#:key inputs outputs #:allow-other-keys)
1898 (let* ((out (assoc-ref outputs "out"))
1899 (file (string-append out "/bin/qucs-s"))
1900 (qucs (assoc-ref inputs "qucs"))
1901 (qucsator (string-append qucs "/bin/qucsator")))
1903 `("CPLUS_INCLUDE_PATH" ":" prefix
1904 (,(string-append (assoc-ref inputs "gcc-toolchain")
1907 (,(string-append (assoc-ref inputs "gcc-toolchain")
1909 `("LIBRARY_PATH" ":" prefix
1910 (,(string-append (assoc-ref inputs "gcc-toolchain")
1912 `("QUCSATOR" ":" prefix (,qucsator))
1913 `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
1914 `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms")
1916 `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco")
1918 `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave")
1920 (symlink qucsator (string-append out "/bin/qucsator"))
1923 `(("libtool-native" ,libtool)))
1927 ("coreutils" ,coreutils)
1928 ("freehdl" ,freehdl)
1929 ("gcc-toolchain" ,gcc-toolchain)
1930 ("iverilog" ,iverilog)
1931 ("libtool" ,libtool)
1933 ("ngspice" ,ngspice)
1934 ("octave" ,octave-cli)
1938 ("xyce-serial" ,xyce-serial)
1939 ("xyce-parallel" ,xyce-parallel)))
1940 (home-page "https://ra3xdh.github.io/")
1941 (synopsis "Circuit simulator with graphical user interface")
1943 "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
1944 The S letter indicates SPICE. The purpose of the Qucs-S subproject is to use
1945 free SPICE circuit simulation kernels with the Qucs GUI. It provides the
1946 simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
1947 (license license:gpl2+)))
1949 (define-public librepcb
1956 (uri (string-append "https://download.librepcb.org/releases/"
1957 version "/librepcb-" version "-source.zip"))
1960 "1xgk0r3nxdd2cy7d1k165d005gsngnz1v2wbwivacw7gis0i8ip7"))))
1961 (build-system gnu-build-system)
1963 `(("qtbase" ,qtbase)
1966 `(("qttools" ,qttools) ; for lrelease
1970 (modify-phases %standard-phases
1972 (lambda* (#:key inputs outputs #:allow-other-keys)
1975 (let ((lrelease (string-append (assoc-ref inputs "qttools")
1977 (out (assoc-ref outputs "out")))
1979 (string-append "QMAKE_LRELEASE=" lrelease)
1980 (string-append "PREFIX=" out)
1981 "../librepcb.pro")))))))
1982 (home-page "https://librepcb.org/")
1983 (synopsis "Electronic Design Automation tool")
1984 (description "LibrePCB is @dfn{Electronic Design Automation} (EDA)
1985 software to develop printed circuit boards. It features human readable file
1986 formats and complete project management with library, schematic and board
1988 (license (list license:gpl3+
1989 license:boost1.0 ; libs/clipper,
1990 ; libs/optional/tests/catch.hpp,
1991 ; libs/sexpresso/tests/catch.hpp
1992 license:expat ; libs/delaunay-triangulation,
1993 ; libs/parseagle, libs/type_safe
1994 license:asl2.0 ; libs/fontobene, libs/googletest,
1996 license:isc ; libs/hoedown
1997 license:cc0 ; libs/optional, libs/sexpresso
1998 license:bsd-2 ; libs/optional/tests/catch.hpp
1999 license:lgpl2.1+)))) ; libs/quazip
2008 (url "https://github.com/markwal/GPX.git")
2012 "1yab269x8qyf7rd04vaxyqyjv4pzz9lp4sc4dwh927k23avr3rw5"))))
2013 (build-system gnu-build-system)
2014 (home-page "https://github.com/markwal/GPX")
2015 (synopsis "Converting gcode to x3g files for 3D printing")
2017 "GPX is a post processing utility for converting gcode output from 3D
2018 slicing software to x3g files for standalone 3D printing on common 3D
2020 (license license:gpl2+)))
2022 (define-public gnucap
2025 (version "20171003")
2029 (uri (string-append "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-"
2033 "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g"))))
2034 (build-system gnu-build-system)
2036 `(("readline" ,readline)))
2039 (modify-phases %standard-phases
2041 (lambda* (#:key outputs #:allow-other-keys)
2042 (let ((out (assoc-ref outputs "out")))
2043 ;; Set correct rpath so that gnucap finds libgnucap.so.
2044 (substitute* (list "apps/configure" "lib/configure"
2045 "main/configure" "modelgen/configure")
2047 (string-append "LDFLAGS = -Wl,-rpath=" out "/lib")))
2048 ;; gnucap uses a hand-written configure script that expects the
2049 ;; --prefix argument to be the first argument passed to it.
2050 (invoke "./configure" (string-append "--prefix=" out)))))
2052 (lambda* (#:key outputs #:allow-other-keys)
2053 (let ((out (assoc-ref outputs "out"))
2054 (libpath "../lib/O:../apps/O"))
2055 (with-directory-excursion "tests"
2056 ;; Make test return non-zero exit code when a test fails.
2058 (("/bin/sh") "/bin/sh -e")
2059 (("\\|\\| echo \"\\*\\*\\*\\* \\$ii fails \\*\\*\\*\\*\"") ""))
2060 ;; Fix expected plugin search path for test c_attach.1.gc
2061 (substitute* "==out/c_attach.1.gc.out"
2062 (("/usr/local/lib/gnucap")
2063 (string-append libpath ":" out "/lib/gnucap")))
2064 ;; Set library path so that gnucap can find libgnucap.so
2065 ;; while running the tests.
2066 (setenv "LD_LIBRARY_PATH" libpath)
2067 (invoke "./test" "../main/O/gnucap" "" "test-output" "==out"))))))))
2068 (home-page "https://www.gnu.org/software/gnucap/")
2069 (synopsis "Mixed analog and digital circuit simulator")
2070 (description "GNUcap is a circuit analysis package. It offers a general
2071 purpose circuit simulator and can perform DC and transient analyses, fourier
2072 analysis and AC analysis. The engine is designed to do true mixed-mode
2074 (license license:gpl3+)))
2076 (define-public cutter
2084 (url "https://github.com/radareorg/cutter")
2085 (commit (string-append "v" version))))
2086 (file-name (git-file-name name version))
2089 "03f3cdckh51anx9gd1b0ndb2fg7061hqngvygf32ky29mm2m2lyv"))))
2090 (build-system gnu-build-system)
2093 (modify-phases %standard-phases
2095 (lambda* (#:key inputs outputs #:allow-other-keys)
2096 (let ((out (assoc-ref outputs "out"))
2097 (radare2 (assoc-ref inputs "radare2")))
2098 ;; fix pkg-config detection ./src/lib_radare2.pri:PREFIX=/usr/lib
2099 ;; override `qmake PREFIX=`
2100 (substitute* "./src/lib_radare2.pri"
2101 (("PREFIX") "R2PREFIX")
2102 (("R2PREFIX=/usr") (string-append "R2PREFIX=" radare2)))
2104 (string-append "PREFIX=" out)
2105 "./src/Cutter.pro")))))))
2107 `(("pkg-config" ,pkg-config)))
2109 `(("qtbase" ,qtbase)
2111 ("openssl" ,openssl)
2112 ("radare2" ,radare2)))
2113 (home-page "https://github.com/radareorg/cutter")
2114 (synopsis "GUI for radare2 reverse engineering framework")
2115 (description "Cutter is a GUI for radare2 reverse engineering framework.
2116 Its goal is making an advanced andcustomizable reverse-engineering platform
2117 while keeping the user experience at mind. Cutter is created by reverse
2118 engineers for reverse engineers.")
2119 (license (list license:cc-by-sa3.0 ;the "Iconic" icon set
2120 license:gpl3+)))) ;everything else
2122 (define-public lib3mf
2129 (uri (git-reference (url "https://github.com/3MFConsortium/lib3mf.git")
2130 (commit (string-append "v" version))))
2131 (file-name (git-file-name name version))
2134 "11wpk6n9ga2p57h1dcrp37w77mii0r7r6mlrgmykf7rvii1rzgqd"))))
2135 (build-system cmake-build-system)
2137 `(("googletest-source" ,(package-source googletest))))
2139 `(("libuuid" ,util-linux)))
2142 (modify-phases %standard-phases
2143 (add-after 'unpack 'unpack-googletest
2144 (lambda* (#:key inputs #:allow-other-keys)
2145 (copy-recursively (assoc-ref inputs "googletest-source")
2146 "UnitTests/googletest")
2148 (synopsis "Implementation of the 3D Manufacturing Format (3MF) file standard")
2150 "Lib3MF is a C++ implementation of the 3D Manufacturing Format (3MF) file
2151 standard. It offers a way to integrate 3MF reading and writing capabilities, as
2152 well as conversion and validation tools for input and output data. The
2153 specification can be downloaded at @url{http://3mf.io/specification/}.")
2154 (home-page "https://3mf.io/")
2155 (license license:bsd-2)))
2157 (define-public openscad
2164 (uri (string-append "https://files.openscad.org/openscad-" version
2168 "0nbgk5q5pgnw53la0kccdcpz2f4xf6d6076rkn0q08z57hkc85ha"))))
2169 (build-system cmake-build-system)
2173 ("double-conversion" ,double-conversion)
2175 ("fontconfig" ,fontconfig)
2178 ("harfbuzz" ,harfbuzz)
2180 ("libxml2" ,libxml2)
2183 ("opencsg" ,opencsg)
2184 ("qscintilla" ,qscintilla)
2186 ("qtmultimedia" ,qtmultimedia)))
2190 ("gettext" ,gettext-minimal)
2191 ("pkg-config" ,pkg-config)
2193 ;; the following are only needed for tests
2194 ("imagemagick" ,imagemagick)
2197 ("xvfb" ,xorg-server)))
2200 (modify-phases %standard-phases
2202 (lambda* (#:key outputs #:allow-other-keys)
2204 (string-append "PREFIX=" (assoc-ref outputs "out")))
2208 (with-directory-excursion "tests"
2209 (invoke "cmake" ".")
2212 ;; strip python test files since lib dir ends up in out/share
2213 (for-each delete-file
2214 (find-files "libraries/MCAD" ".*\\.py"))
2216 (synopsis "Script-based 3D modeling application")
2218 "OpenSCAD is a 3D Computer-aided Design (CAD) application. Unlike an
2219 interactive modeler, OpenSCAD generates 3D models from a script, giving you
2220 full programmatic control over your models.")
2221 (home-page "https://www.openscad.org/")
2222 (license license:gpl2+)))
2224 (define-public freecad
2232 (url "https://github.com/FreeCAD/FreeCAD.git")
2234 (file-name (git-file-name name version))
2237 "1ny29y0h8smg1bwi5yn4kcnyfprqh3v7v2z8837cmmhcwp8dr95m"))))
2238 (build-system cmake-build-system)
2240 `(("doxygen" ,doxygen)
2241 ("graphviz" ,graphviz)
2242 ("qttools" ,qttools)
2243 ("pkg-config" ,pkg-config)
2249 ("freetype" ,freetype)
2252 ("libarea" ,libarea)
2253 ("libmedfile" ,libmedfile)
2254 ("libspnav" ,libspnav)
2257 ("openmpi" ,openmpi)
2258 ("opencascade-occt" ,opencascade-occt)
2259 ("python-matplotlib" ,python-matplotlib)
2260 ("python-pyside-2" ,python-pyside-2)
2261 ("python-pyside-2-tools" ,python-pyside-2-tools)
2262 ("python-shiboken-2" ,python-shiboken-2)
2263 ("python-wrapper" ,python-wrapper)
2266 ("qtx11extras" ,qtx11extras)
2267 ("qtxmlpatterns" ,qtxmlpatterns)
2268 ;; qtwebkit is optional. We remove it currently, because it takes
2269 ;; much time to compile and substitutes are often unavailable
2270 ;;("qtwebkit" ,qtwebkit)
2273 ("xerces-c" ,xerces-c)
2280 (string-append "-DCMAKE_INSTALL_LIBDIR="
2281 (assoc-ref %outputs "out") "/lib"))
2283 (modify-phases %standard-phases
2284 (add-before 'configure 'restore-pythonpath
2286 (substitute* "src/Main/MainGui.cpp"
2287 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
2289 (add-after 'install 'wrap-pythonpath
2290 (lambda* (#:key outputs #:allow-other-keys)
2291 (let ((out (assoc-ref outputs "out")))
2292 (wrap-program (string-append out "/bin/FreeCAD")
2294 'prefix (list (getenv "PYTHONPATH")))))
2296 (home-page "https://www.freecadweb.org/")
2297 (synopsis "Your Own 3D Parametric Modeler")
2299 "FreeCAD is a general purpose feature-based, parametric 3D modeler for
2300 CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
2301 product design but also fits a wider range of uses in engineering, such as
2302 architecture or other engineering specialties. It is 100% Open Source (LGPL2+
2303 license) and extremely modular, allowing for very advanced extension and
2312 (define-public libmedfile
2320 "https://files.salome-platform.org/Salome/other/med-"
2324 "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
2325 (build-system cmake-build-system)
2326 (inputs `(("hdf5" ,hdf5-1.10)))
2329 (modify-phases %standard-phases
2330 (add-after 'install 'remove-test-output
2331 (lambda* (#:key outputs #:allow-other-keys)
2332 (let ((out (assoc-ref outputs "out")))
2333 (delete-file-recursively
2334 (string-append out "/bin/testc"))
2336 (home-page "https://www.salome-platform.org")
2337 (synopsis "Library to read and write MED files")
2339 "The purpose of the MED module is to provide a standard for storing and
2340 recovering computer data associated to numerical meshes and fields, and to
2341 facilitate the exchange between codes and solvers.
2343 The persistent data storage is based upon HDF format (like CGNS, a standard
2344 developed by Boeing and NASA in the area of Computational Fluid Dynamic).
2346 MED also provides structures to hold data on meshes and fields. These
2347 structures are exchanged between solvers, hide the communication level (CORBA
2348 or MPI), and offer persistence (read/write in .med files).
2350 The main benefit of a common exchange format is reduced complexity of code
2351 coupling. It also allows sharing such high level functionalities as
2352 computation of nodal connectivity of sub-elements (faces and edges),
2353 arithmetic operations on fields, entity location functionalities, and
2354 interpolation toolkit.")
2355 (license license:gpl3+)))
2357 (define-public libarea
2358 (let ((revision "1")
2359 (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
2362 (version (git-version "0" revision commit))
2366 (uri (git-reference (url "https://github.com/Heeks/libarea.git")
2368 (file-name (git-file-name name version))
2370 (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
2371 (build-system gnu-build-system)
2372 (inputs `(("boost" ,boost)
2373 ("python-wrapper" ,python-wrapper)))
2375 `(("cmake" ,cmake)))
2379 (modify-phases %standard-phases
2380 (add-after 'configure 'cmake-configure
2381 (lambda* (#:key inputs outputs #:allow-other-keys)
2382 (let ((out (assoc-ref outputs "out"))
2383 (cmake (assoc-ref inputs "cmake")))
2386 (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
2387 (delete 'configure))))
2388 (home-page "https://github.com/Heeks/libarea")
2390 "Library and python module for pocketing and profiling operations")
2392 "Area is a CAM-related software for pocketing operation.
2394 This project provides library and associated python-module to compute pocket
2400 (define-public libspnav
2407 (url "https://github.com/FreeSpacenav/libspnav.git")
2408 (commit (string-append "libspnav-" version))))
2411 "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba"))
2412 (file-name (git-file-name name version))))
2413 (build-system gnu-build-system)
2415 `(("libx11" ,libx11)))
2416 (arguments `(#:tests? #f))
2417 (home-page "http://spacenav.sourceforge.net/")
2419 "Library for communicating with spacenavd or 3dxsrv")
2421 "The libspnav library is provided as a replacement of the magellan
2422 library. It provides a cleaner, and more orthogonal interface. libspnav
2423 supports both the original X11 protocol for communicating with the driver, and
2424 the new alternative non-X protocol. Programs that choose to use the X11
2425 protocol, are automatically compatible with either the free spacenavd driver
2426 or the official 3dxserv, as if they were using the magellan SDK.
2428 Also, libspnav provides a magellan API wrapper on top of the new API. So, any
2429 applications that were using the magellan library, can switch to libspnav
2430 without any changes. And programmers that are familliar with the magellan API
2431 can continue using it with a free library without the restrictions of the
2433 (license license:bsd-3)))