gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / engineering.scm
CommitLineData
ffb010b5 1;;; GNU Guix --- Functional package management for GNU
afb54fd1 2;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
93094501 3;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
cd7bd1cc 4;;; Copyright © 2016, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
0de98139 5;;; Copyright © 2016 David Thompson <davet@gnu.org>
5e7388e1 6;;; Copyright © 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
4f12a62d 7;;; Copyright © 2016, 2017, 2018 Theodoros Foradis <theodoros@foradis.org>
6febda94 8;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
254b3310 9;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
7c1445f8 10;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
1618c6fe 11;;; Copyright © 2018, 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
b67bff22 12;;; Copyright © 2018, 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
6f8ade6e 13;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
5cded306 14;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
2c0040ae 15;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
2895a87f 16;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
259e65aa 17;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
86a56622 18;;; Copyright © 2020,2021 Vincent Legoll <vincent.legoll@gmail.com>
1a044e39 19;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
ce2fe8bf 20;;; Copyright © 2020, 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
512d23c6 21;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
d29e09ff 22;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
dcb59439 23;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
c1da9829 24;;; Copyright © 2021 qblade <qblade@protonmail.com>
cb704852 25;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com>
ffb010b5
RW
26;;;
27;;; This file is part of GNU Guix.
28;;;
29;;; GNU Guix is free software; you can redistribute it and/or modify it
30;;; under the terms of the GNU General Public License as published by
31;;; the Free Software Foundation; either version 3 of the License, or (at
32;;; your option) any later version.
33;;;
34;;; GNU Guix is distributed in the hope that it will be useful, but
35;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37;;; GNU General Public License for more details.
38;;;
39;;; You should have received a copy of the GNU General Public License
40;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41
40fbd52a 42(define-module (gnu packages engineering)
ffb010b5
RW
43 #:use-module (guix packages)
44 #:use-module (guix download)
93094501 45 #:use-module (guix gexp)
ffb010b5 46 #:use-module (guix git-download)
e3c3fb1d 47 #:use-module (guix svn-download)
93094501
FB
48 #:use-module (guix monads)
49 #:use-module (guix store)
412726ee 50 #:use-module (guix utils)
91cabd3e 51 #:use-module ((srfi srfi-1) #:hide (zip))
ffb010b5 52 #:use-module ((guix licenses) #:prefix license:)
847768b9 53 #:use-module (guix build-system ant)
befc9ff6 54 #:use-module (guix build-system cmake)
dcb59439 55 #:use-module (guix build-system emacs)
ffb010b5 56 #:use-module (guix build-system gnu)
f70be011 57 #:use-module (guix build-system python)
25b99921 58 #:use-module (guix build-system qt)
ffb010b5 59 #:use-module (gnu packages)
4534d85e 60 #:use-module (gnu packages algebra)
95283f3f 61 #:use-module (gnu packages autotools)
5699a3cf 62 #:use-module (gnu packages base)
512d23c6 63 #:use-module (gnu packages bdw-gc)
20500662 64 #:use-module (gnu packages bison)
ffb010b5 65 #:use-module (gnu packages boost)
4534d85e 66 #:use-module (gnu packages check)
2003e837 67 #:use-module (gnu packages cmake)
d3f95898 68 #:use-module (gnu packages commencement)
93094501 69 #:use-module (gnu packages compression)
befc9ff6 70 #:use-module (gnu packages curl)
512d23c6 71 #:use-module (gnu packages dejagnu)
ecc8cd98 72 #:use-module (gnu packages digest)
bf51c1af 73 #:use-module (gnu packages docbook)
4cd9de60 74 #:use-module (gnu packages documentation)
20500662 75 #:use-module (gnu packages flex)
ffb010b5 76 #:use-module (gnu packages fontutils)
c31b61ef 77 #:use-module (gnu packages fpga)
324b0040 78 #:use-module (gnu packages freedesktop)
1251c664 79 #:use-module (gnu packages gcc)
20500662 80 #:use-module (gnu packages gd)
b67bff22 81 #:use-module (gnu packages geo)
95283f3f 82 #:use-module (gnu packages gettext)
93094501 83 #:use-module (gnu packages ghostscript)
20500662 84 #:use-module (gnu packages gl)
412726ee
RW
85 #:use-module (gnu packages glib)
86 #:use-module (gnu packages gnome)
c31b61ef 87 #:use-module (gnu packages gperf)
2316ce51 88 #:use-module (gnu packages graphics)
4cd9de60 89 #:use-module (gnu packages graphviz)
1ca54999 90 #:use-module (gnu packages groff)
412726ee
RW
91 #:use-module (gnu packages gtk)
92 #:use-module (gnu packages guile)
4534d85e 93 #:use-module (gnu packages image)
4cd9de60 94 #:use-module (gnu packages image-processing)
e981ca36 95 #:use-module (gnu packages imagemagick)
ecc8cd98 96 #:use-module (gnu packages libevent)
38cf2ba0 97 #:use-module (gnu packages linux) ;FIXME: for pcb
512d23c6 98 #:use-module (gnu packages lisp)
0de98139 99 #:use-module (gnu packages m4)
ffb010b5 100 #:use-module (gnu packages maths)
512d23c6 101 #:use-module (gnu packages man)
44669577 102 #:use-module (gnu packages multiprecision)
a6edcfaf 103 #:use-module (gnu packages mpi)
f37f949d 104 #:use-module (gnu packages ncurses)
07d859cc
VM
105 #:use-module (gnu packages parallel)
106 #:use-module (gnu packages pcre)
412726ee 107 #:use-module (gnu packages perl)
ffb010b5 108 #:use-module (gnu packages pkg-config)
bf51c1af 109 #:use-module (gnu packages pretty-print)
befc9ff6 110 #:use-module (gnu packages python)
c1da9829 111 #:use-module (gnu packages python-crypto)
44d10b1f 112 #:use-module (gnu packages python-xyz)
ffb010b5 113 #:use-module (gnu packages qt)
5e872d4b 114 #:use-module (gnu packages readline)
ce2fe8bf
EZ
115 #:use-module (gnu packages serialization)
116 #:use-module (gnu packages sqlite)
befc9ff6 117 #:use-module (gnu packages swig)
4cd9de60 118 #:use-module (gnu packages tbb)
20500662 119 #:use-module (gnu packages tcl)
1ca54999 120 #:use-module (gnu packages texinfo)
befc9ff6 121 #:use-module (gnu packages tls)
8f9ac901 122 #:use-module (gnu packages tex)
7cdc7e57 123 #:use-module (gnu packages version-control)
512d23c6 124 #:use-module (gnu packages web)
befc9ff6 125 #:use-module (gnu packages wxwidgets)
2316ce51 126 #:use-module (gnu packages xml)
ce2fe8bf 127 #:use-module (gnu packages xiph)
2c74e870 128 #:use-module (gnu packages openkinect)
44669577 129 #:use-module (gnu packages xorg))
ffb010b5
RW
130
131(define-public librecad
132 (package
133 (name "librecad")
6eea92e3 134 (version "2.2.0-rc2")
ffb010b5
RW
135 (source (origin
136 (method url-fetch)
137 (uri (string-append
138 "https://github.com/LibreCAD/LibreCAD/archive/"
139 version ".tar.gz"))
d8a4b932 140 (file-name (string-append name "-" version ".tar.gz"))
ffb010b5
RW
141 (sha256
142 (base32
6eea92e3 143 "0a7fzhxkkn2s3hkgqrw3s3wyspzfla3c5lgbsjyqzvlnrp3anxnm"))))
ffb010b5
RW
144 (build-system gnu-build-system)
145 (arguments
146 '(#:phases
d694230a 147 (modify-phases %standard-phases
7e3aca2b
RW
148 ;; Without this patch boost complains that "make_array" is not a
149 ;; member of "boost::serialization".
150 (add-after 'unpack 'patch-boost-error
151 (lambda _
152 (substitute* "librecad/src/lib/math/lc_quadratic.h"
153 (("#include \"rs_vector.h\"" line)
154 (string-append line
155 "\n#include <boost/serialization/array_wrapper.hpp>")))
156 (substitute* "librecad/src/lib/math/rs_math.cpp"
157 (("#include <boost/numeric/ublas/matrix.hpp>" line)
158 (string-append "#include <boost/serialization/array_wrapper.hpp>\n"
159 line)))
160 #t))
6cedd611
CL
161 ;; Fix build against Qt 5.11.
162 (add-after 'unpack 'add-missing-headers
163 (lambda _
164 (substitute* "librecad/src/ui/generic/widgetcreator.cpp"
165 (("#include <QPushButton>") "#include <QPushButton>
166#include <QActionGroup>"))
167 #t))
7e3aca2b
RW
168 (add-after 'unpack 'patch-paths
169 (lambda* (#:key outputs #:allow-other-keys)
170 (let ((out (assoc-ref outputs "out")))
171 (substitute* "librecad/src/lib/engine/rs_system.cpp"
172 (("/usr/share") (string-append out "/share"))))))
173 (replace 'configure
174 (lambda* (#:key inputs #:allow-other-keys)
175 (system* "qmake" (string-append "BOOST_DIR="
176 (assoc-ref inputs "boost")))))
177 (replace 'install
178 (lambda* (#:key outputs #:allow-other-keys)
179 (let* ((out (assoc-ref outputs "out"))
180 (bin (string-append out "/bin"))
181 (share (string-append out "/share/librecad")))
182 (mkdir-p bin)
183 (install-file "unix/librecad" bin)
184 (mkdir-p share)
185 (copy-recursively "unix/resources" share))
9cc51d16
RW
186 #t))
187 ;; Ensure that icons are found at runtime
188 (add-after 'install 'wrap-executable
189 (lambda* (#:key inputs outputs #:allow-other-keys)
190 (let* ((out (assoc-ref outputs "out"))
191 (qt '("qtbase" "qtsvg")))
192 (wrap-program (string-append out "/bin/librecad")
193 `("QT_PLUGIN_PATH" ":" prefix
194 ,(map (lambda (label)
195 (string-append (assoc-ref inputs label)
196 "/lib/qt5/plugins/"))
197 qt)))
198 #t))))))
ffb010b5
RW
199 (inputs
200 `(("boost" ,boost)
201 ("muparser" ,muparser)
202 ("freetype" ,freetype)
9fdda0b2
RW
203 ("qtbase" ,qtbase)
204 ("qtsvg" ,qtsvg)))
ffb010b5
RW
205 (native-inputs
206 `(("pkg-config" ,pkg-config)
207 ("which" ,which)))
6a0d1bd3 208 (home-page "https://librecad.org/")
ffb010b5
RW
209 (synopsis "Computer-aided design (CAD) application")
210 (description
211 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
212plans and designs.")
213 (license license:gpl2)))
412726ee
RW
214
215(define-public geda-gaf
216 (package
217 (name "geda-gaf")
1101c73c 218 (version "1.10.0")
412726ee
RW
219 (source (origin
220 (method url-fetch)
221 (uri (string-append
1101c73c 222 "http://ftp.geda-project.org/geda-gaf/stable/v"
412726ee
RW
223 (version-major+minor version) "/"
224 version "/geda-gaf-" version ".tar.gz"))
225 (sha256
226 (base32
1101c73c 227 "06ivgarvwbzjz2wigxzzkm8iszldi2p6x3a6jnlczjyrz4csddsy"))))
412726ee
RW
228 (build-system gnu-build-system)
229 (arguments
230 '(#:phases
2352c97d
RW
231 (modify-phases %standard-phases
232 ;; tests require a writable HOME
233 (add-before 'check 'set-home
234 (lambda _
235 (setenv "HOME" (getenv "TMPDIR"))
a01d926f 236 #t))
a01d926f
RW
237 (add-after 'unpack 'disable-failing-tests
238 (lambda _
1101c73c
RW
239 (substitute* "xorn/tests/Makefile.in"
240 (("-Werror") ""))
241 ;; This test returns its correct result in an unexpected order.
242 (substitute* "libgeda/scheme/unit-tests/t0402-config.scm"
243 (("\\(begin-config-test 'config-keys" m)
244 (string-append "#;" m)))
2352c97d 245 #t)))
0de98139
DT
246 #:configure-flags
247 (let ((pcb (assoc-ref %build-inputs "pcb")))
248 (list (string-append "--with-pcb-datadir=" pcb "/share")
249 (string-append "--with-pcb-lib-path="
250 pcb "/share/pcb/pcblib-newlib:"
251 pcb "/share/pcb/newlib")))))
412726ee 252 (inputs
1101c73c
RW
253 `(("gamin" ,gamin)
254 ("glib" ,glib)
412726ee
RW
255 ("gtk" ,gtk+-2)
256 ("guile" ,guile-2.0)
0de98139
DT
257 ("shared-mime-info" ,shared-mime-info)
258 ("m4" ,m4)
1101c73c
RW
259 ("pcb" ,pcb)
260 ("python" ,python-2))) ; for xorn
412726ee
RW
261 (native-inputs
262 `(("pkg-config" ,pkg-config)
0b43ecb0 263 ("desktop-file-utils" ,desktop-file-utils)
412726ee
RW
264 ("perl" ,perl))) ; for tests
265 (home-page "http://geda-project.org/")
266 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
267 (description
a124bbd2 268 "Gaf stands for “gschem and friends”. It is a subset of the entire tool
412726ee
RW
269suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
270which currently includes: gschem, a schematic capture program; gnetlist, a
271netlist generation program; gsymcheck, a syntax checker for schematic symbols;
81a5dcfc 272gattrib, a spreadsheet programme that manipulates the properties of symbols of
412726ee
RW
273a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
274tool to forward annotation from your schematic to layout using PCB; some minor
275utilities.")
276 (license license:gpl2+)))
277
1ca54999
LC
278(define-public lepton-eda
279 ;; This is a fork of gEDA/gaf started in late 2016. One of its goal is to
280 ;; keep and to extend Guile support.
281 (package
282 (inherit geda-gaf)
283 (name "lepton-eda")
1f0f5d01 284 (version "1.9.13-20201211")
1ca54999
LC
285 (home-page "https://github.com/lepton-eda/lepton-eda")
286 (source (origin
287 (method git-fetch)
288 (uri (git-reference (url home-page) (commit version)))
289 (sha256
290 (base32
1f0f5d01 291 "0xfx6d0pyfrxr1c0nm4pbmb716hng78rgizaa6vsas9347n4kk1n"))
1ca54999
LC
292 (file-name (git-file-name name version))))
293 (native-inputs
294 `(("autoconf" ,autoconf)
295 ("automake" ,automake)
91f92fc2 296 ("desktop-file-utils" ,desktop-file-utils)
1ca54999 297 ("libtool" ,libtool)
f2d97d57 298 ("gettext" ,gettext-minimal)
1ca54999
LC
299 ("texinfo" ,texinfo)
300 ("groff" ,groff)
301 ("which" ,which)
302 ,@(package-native-inputs geda-gaf)))
ef0ef831
RW
303 (inputs
304 `(("glib" ,glib)
1f0f5d01
RW
305 ("gtk" ,gtk+)
306 ("gtksheet" ,gtksheet)
ef0ef831 307 ("guile" ,guile-2.2)
ef0ef831
RW
308 ("shared-mime-info" ,shared-mime-info)
309 ("m4" ,m4)
310 ("pcb" ,pcb)))
1ca54999 311 (arguments
1f0f5d01
RW
312 `(#:configure-flags
313 (let ((pcb (assoc-ref %build-inputs "pcb")))
314 ;; When running "make", the POT files are built with the build time as
315 ;; their "POT-Creation-Date". Later on, "make" notices that .pot
316 ;; files were updated and goes on to run "msgmerge"; as a result, the
317 ;; non-deterministic POT-Creation-Date finds its way into .po files,
318 ;; and then in .gmo files. To avoid that, simply make sure 'msgmerge'
319 ;; never runs. See <https://bugs.debian.org/792687>.
320 (list "ac_cv_path_MSGMERGE=true"
321 "--with-gtk3"
322 (string-append "--with-pcb-datadir=" pcb "/share")
323 (string-append "--with-pcb-lib-path="
324 pcb "/share/pcb/pcblib-newlib:"
325 pcb "/share/pcb/newlib")))
326 #:phases
327 (modify-phases %standard-phases
328 (add-before 'build 'fix-dynamic-link
329 (lambda* (#:key inputs outputs #:allow-other-keys)
330 (substitute* "libleptongui/scheme/schematic/ffi.scm.in"
331 (("@LIBLEPTONGUI@")
332 (string-append (assoc-ref outputs "out")
333 "/lib/libleptongui.so")))
334 (substitute* '("libleptongui/scheme/schematic/ffi/gtk.scm.in"
335 "libleptonattrib/lepton-attrib.scm")
336 (("@LIBGTK@")
337 (string-append (assoc-ref inputs "gtk")
338 "/lib/libgtk-3.so")))
339 (substitute* "liblepton/scheme/lepton/ffi.scm.in"
340 (("@LIBLEPTON@")
341 (string-append (assoc-ref outputs "out")
342 "/lib/liblepton.so")))
343 (substitute* "libleptonattrib/lepton-attrib.scm"
344 (("@LIBLEPTONATTRIB@")
345 (string-append (assoc-ref outputs "out")
346 "/lib/libleptonattrib.so")))
347 (substitute* "liblepton/scheme/lepton/log.scm.in"
348 (("@LIBGLIB@")
349 (string-append (assoc-ref inputs "glib")
350 "/lib/libglib-2.0.so")))
1ca54999 351
1f0f5d01
RW
352 ;; For finding libraries when running tests before installation.
353 (setenv "LIBLEPTONGUI"
354 (string-append (getcwd)
355 "/libleptongui/src/.libs/libleptongui.so"))
356 (setenv "LIBLEPTON"
357 (string-append (getcwd)
358 "/libleptongui/src/.libs/liblepton.so"))
359 (setenv "LD_LIBRARY_PATH"
360 (string-append (getcwd) "/libleptonattrib/src/.libs/:"
361 (getenv "LIBRARY_PATH")))
362 #t))
363 (add-before 'bootstrap 'prepare
364 (lambda _
365 ;; Some of the scripts there are invoked by autogen.sh.
366 (for-each patch-shebang (find-files "build-tools"))
1ca54999 367
1f0f5d01
RW
368 ;; Make sure 'msgmerge' can modify the PO files.
369 (for-each (lambda (po)
370 (chmod po #o666))
371 (find-files "." "\\.po$"))
372
373 ;; This would normally be created by invoking 'git', but it
374 ;; doesn't work here.
375 (call-with-output-file "version.h"
376 (lambda (port)
377 (format port "#define PACKAGE_DATE_VERSION \"~a\"~%"
378 ,(string-drop version
379 (+ 1 (string-index version #\-))))
380 (format port "#define PACKAGE_DOTTED_VERSION \"~a\"~%"
381 ,(string-take version
382 (string-index version #\-)))
383 (format port "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%")))
384 #t))
385 (add-after 'install 'compile-scheme-files
386 (lambda* (#:key outputs #:allow-other-keys)
387 (unsetenv "LIBLEPTONGUI")
388 (unsetenv "LIBLEPTON")
389 (unsetenv "LD_LIBRARY_PATH")
390 (invoke "make" "precompile")
391 #t)))))
1ca54999
LC
392 (description
393 "Lepton EDA ia an @dfn{electronic design automation} (EDA) tool set
394forked from gEDA/gaf in late 2016. EDA tools are used for electrical circuit
395design, schematic capture, simulation, prototyping, and production. Lepton
396EDA includes tools for schematic capture, attribute management, bill of
397materials (BOM) generation, netlisting into over 20 netlist formats, analog
398and digital simulation, and printed circuit board (PCB) layout, and many other
399features.")))
400
20500662
RW
401(define-public pcb
402 (package
403 (name "pcb")
88fb1562 404 (version "4.0.2")
20500662
RW
405 (source (origin
406 (method url-fetch)
e981ca36
RW
407 (uri (string-append "mirror://sourceforge/pcb/pcb/pcb-" version
408 "/pcb-" version ".tar.gz"))
20500662
RW
409 (sha256
410 (base32
88fb1562 411 "1a7rilp75faidny0r4fdwdxkflyrqp6svxv9lbg7h868293962iz"))))
20500662
RW
412 (build-system gnu-build-system)
413 (arguments
414 `(#:phases
dc1d3cde
KK
415 (modify-phases %standard-phases
416 (add-after 'unpack 'use-wish8.6
417 (lambda _
418 (substitute* "configure"
419 (("wish85") "wish8.6"))
420 #t))
88fb1562
RW
421 ;; It checks for "xhost", which we don't have. This shouldn't
422 ;; matter, because the test is supposed to be skipped, but it causes
423 ;; "run_tests.sh" (and thus the "check" phase) to fail.
424 (add-after 'unpack 'fix-check-for-display
425 (lambda _
426 (substitute* "tests/run_tests.sh"
427 (("have_display=no") "have_display=yes"))
428 #t))
dc1d3cde
KK
429 (add-after 'install 'wrap
430 (lambda* (#:key inputs outputs #:allow-other-keys)
431 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
432 ;; fix of the mesa package we wrap the pcb executable such that
433 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
434 (let* ((out (assoc-ref outputs "out"))
435 (path (string-append (assoc-ref inputs "udev") "/lib")))
436 (wrap-program (string-append out "/bin/pcb")
437 `("LD_LIBRARY_PATH" ":" prefix (,path))))
438 #t))
439 (add-before 'check 'pre-check
440 (lambda _
441 (system "Xvfb :1 &")
442 (setenv "DISPLAY" ":1")
443 #t)))))
20500662
RW
444 (inputs
445 `(("dbus" ,dbus)
446 ("mesa" ,mesa)
447 ("udev" ,eudev) ;FIXME: required by mesa
448 ("glu" ,glu)
449 ("gd" ,gd)
450 ("gtk" ,gtk+-2)
451 ("gtkglext" ,gtkglext)
20500662
RW
452 ("shared-mime-info" ,shared-mime-info)
453 ("tk" ,tk)))
454 (native-inputs
455 `(("pkg-config" ,pkg-config)
456 ("intltool" ,intltool)
457 ("bison" ,bison)
465734ba 458 ("desktop-file-utils" ,desktop-file-utils)
e981ca36
RW
459 ("flex" ,flex)
460 ;; For tests
461 ("imagemagick" ,imagemagick)
462 ("gerbv" ,gerbv)
463 ("ghostscript" ,ghostscript)
ff337525 464 ("xvfb" ,xorg-server-for-tests)))
20500662
RW
465 (home-page "http://pcb.geda-project.org/")
466 (synopsis "Design printed circuit board layouts")
467 (description
468 "GNU PCB is an interactive tool for editing printed circuit board
469layouts. It features a rats-nest implementation, schematic/netlist import,
470and design rule checking. It also includes an autorouter and a trace
471optimizer; and it can produce photorealistic and design review images.")
472 (license license:gpl2+)))
93094501 473
49c2665f
RW
474(define-public pcb-rnd
475 (package (inherit pcb)
476 (name "pcb-rnd")
874d2bc9 477 (version "2.2.4")
49c2665f
RW
478 (source (origin
479 (method url-fetch)
480 (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/"
481 "pcb-rnd-" version ".tar.gz"))
482 (sha256
483 (base32
874d2bc9 484 "06ylc2rd4yvzp3krk62q9dbi13h0yq1x257fbjkh10vfjn0ga5c2"))))
49c2665f 485 (arguments
874d2bc9 486 `(#:tests? #f ; no check target
49c2665f
RW
487 #:phases
488 (modify-phases %standard-phases
489 (add-after 'unpack 'cc-is-gcc
490 (lambda _ (setenv "CC" "gcc") #t))
491 (replace 'configure
492 ;; The configure script doesn't tolerate most of our configure flags.
493 (lambda* (#:key outputs #:allow-other-keys)
a8416e69
RW
494 (invoke "sh" "configure"
495 (string-append "--prefix="
496 (assoc-ref outputs "out"))))))))
49c2665f
RW
497 (home-page "http://repo.hu/projects/pcb-rnd/")
498 (description "PCB RND is a fork of the GNU PCB circuit board editing tool
499featuring various improvements and bug fixes.")))
500
93094501
FB
501(define-public fastcap
502 (package
503 (name "fastcap")
504 (version "2.0-18Sep92")
505 (source (origin
95001d4b 506 (method url-fetch/tarbomb)
93094501
FB
507 (uri (string-append "http://www.rle.mit.edu/cpg/codes/"
508 name "-" version ".tgz"))
509 (sha256
510 (base32
511 "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k"))
3dac53be
FB
512 (snippet
513 ;; Remove a non-free file.
6cbee49d
MW
514 '(begin
515 (delete-file "doc/psfig.sty")
516 #t))
fc1adab1
AK
517 (patches (search-patches "fastcap-mulSetup.patch"
518 "fastcap-mulGlobal.patch"))))
93094501
FB
519 (build-system gnu-build-system)
520 (native-inputs
697e341e
RW
521 ;; FIXME: with texlive-tiny citation references are rendered as question
522 ;; marks. During the build warnings like these are printed:
523 ;; LaTeX Warning: Citation `nabors91' on page 2 undefined on input line 3.
5a23696a 524 `(("texlive" ,(texlive-union (list texlive-fonts-amsfonts)))
fb0b9ff1 525 ("ghostscript" ,ghostscript)))
93094501
FB
526 (arguments
527 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
528 #:parallel-build? #f
529 #:tests? #f ;; no tests-suite
530 #:modules ((srfi srfi-1)
531 ,@%gnu-build-system-modules)
532 #:phases
533 (modify-phases %standard-phases
534 (add-after 'build 'make-doc
697e341e 535 (lambda _
5a23696a 536 (invoke "make" "CC=gcc" "RM=rm" "SHELL=sh" "manual")))
93094501 537 (add-before 'make-doc 'fix-doc
697e341e
RW
538 (lambda _
539 (substitute* "doc/Makefile" (("/bin/rm") (which "rm")))
540 (substitute* (find-files "doc" "\\.tex")
541 (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}"
542 all file scale)
543 (string-append "\\includegraphics[scale=" scale "]{"
544 file "}"))
545 (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}"
546 all file width)
547 (string-append "\\includegraphics[width=" width "]{"
548 file "}"))
549 (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}"
550 all file height)
551 (string-append "\\includegraphics[height=" height "]{"
552 file "}"))
553 (("\\\\psfig\\{figure=([^,]*)\\}" all file)
554 (string-append "\\includegraphics{" file "}")))
555 (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex")
556 (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}"
557 all options class)
558 (string-append "\\documentclass[" options "]{"
559 class "}\n"
560 "\\usepackage{graphicx}\n"
561 "\\usepackage{robinspace}"))
562 (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all)
563 (string-append "%" all))
564 (("\\\\setstretch\\{.*\\}" all)
565 (string-append "%" all)))
566 #t))
93094501
FB
567 (delete 'configure)
568 (add-before 'install 'clean-bin
697e341e
RW
569 (lambda _
570 (delete-file (string-append (getcwd) "/bin/README"))
571 #t))
93094501 572 (add-before 'install 'make-pdf
697e341e
RW
573 (lambda _
574 (setenv "HOME" "/tmp") ; FIXME: for texlive font cache
575 (with-directory-excursion "doc"
576 (and
5a23696a
RW
577 (for-each (lambda (file)
578 (invoke "dvips" file "-o"))
579 (find-files "." "\\.dvi"))
580 (for-each (lambda (file)
581 (invoke "ps2pdf" file))
582 '("mtt.ps" "ug.ps" "tcad.ps"))
583 (invoke "make" "clean")))))
93094501 584 (replace 'install
697e341e
RW
585 (lambda* (#:key outputs #:allow-other-keys)
586 (let* ((out (assoc-ref outputs "out"))
587 (data (string-append out "/share"))
588 (bin (string-append out "/bin"))
589 (doc (string-append data "/doc/" ,name "-" ,version))
590 (examples (string-append doc "/examples")))
591 (with-directory-excursion "bin"
592 (for-each (lambda (f)
593 (install-file f bin))
594 (find-files "." ".*")))
595 (copy-recursively "doc" doc)
596 (copy-recursively "examples" examples)
597 #t))))))
45a21ee4 598 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
93094501
FB
599 (synopsis "Multipole-accelerated capacitance extraction program")
600 (description
601 "Fastcap is a capacitance extraction program based on a
602multipole-accelerated algorithm.")
603 (license (license:non-copyleft #f "See fastcap.c."))))
23bae7bb
FB
604
605(define-public fasthenry
606 (package
607 (name "fasthenry")
608 (version "3.0-12Nov96")
609 (source (origin
610 (method url-fetch)
611 (file-name (string-append name "-" version ".tar.gz"))
612 (uri (string-append
613 "http://www.rle.mit.edu/cpg/codes/" name
614 "-" version ".tar.z"))
615 (sha256
616 (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
fc1adab1
AK
617 (patches (search-patches "fasthenry-spAllocate.patch"
618 "fasthenry-spBuild.patch"
619 "fasthenry-spUtils.patch"
620 "fasthenry-spSolve.patch"
621 "fasthenry-spFactor.patch"))))
23bae7bb
FB
622 (build-system gnu-build-system)
623 (arguments
624 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
625 #:parallel-build? #f
626 #:tests? #f ;; no tests-suite
627 #:modules ((srfi srfi-1)
628 ,@%gnu-build-system-modules)
629 #:phases
630 (modify-phases %standard-phases
631 (delete 'configure)
632 (replace 'install
633 (lambda* (#:key outputs #:allow-other-keys)
634 (let* ((out (assoc-ref outputs "out"))
635 (data (string-append out "/share"))
636 (bin (string-append out "/bin"))
637 (doc (string-append data "/doc/" ,name "-" ,version))
638 (examples (string-append doc "/examples")))
639 (with-directory-excursion "bin"
96c46210
LC
640 (for-each (lambda (f)
641 (install-file f bin))
642 (find-files "." ".*")))
23bae7bb
FB
643 (copy-recursively "doc" doc)
644 (copy-recursively "examples" examples)
645 #t))))))
ebeaf280 646 (home-page "https://www.rle.mit.edu/cpg/research_codes.htm")
23bae7bb
FB
647 (synopsis "Multipole-accelerated inductance analysis program")
648 (description
649 "Fasthenry is an inductance extraction program based on a
650multipole-accelerated algorithm.")
651 (license (license:non-copyleft #f "See induct.c."))))
95283f3f 652
3d5fd240
RW
653(define-public fritzing
654 (package
655 (name "fritzing")
7cdc7e57 656 (version "0.9.3b")
3d5fd240 657 (source (origin
7cdc7e57
RW
658 (method git-fetch)
659 (uri (git-reference
b0e7b699 660 (url "https://github.com/fritzing/fritzing-app")
7cdc7e57
RW
661 (commit version)))
662 (file-name (git-file-name name version))
3d5fd240
RW
663 (sha256
664 (base32
7cdc7e57 665 "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
3d5fd240
RW
666 (build-system gnu-build-system)
667 (arguments
668 `(#:phases
669 (modify-phases %standard-phases
670 (replace 'configure
671 (lambda* (#:key inputs outputs #:allow-other-keys)
7cdc7e57
RW
672 (copy-recursively (assoc-ref inputs "fritzing-parts-db")
673 "parts")
674 ;; Make compatible with libgit2 > 0.24
675 (substitute* "src/version/partschecker.cpp"
676 (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
677 "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
678
679 ;; Use system libgit2 and boost.
680 (substitute* "phoenix.pro"
681 (("^LIBGIT2INCLUDE =.*")
682 (string-append "LIBGIT2INCLUDE="
683 (assoc-ref inputs "libgit2") "/include\n"))
684 (("^ LIBGIT2LIB =.*")
685 (string-append " LIBGIT2LIB="
686 (assoc-ref inputs "libgit2") "/lib\n")))
687 ;; This file checks for old versions of Boost, insisting on
688 ;; having us download the boost sources and placing them in the
689 ;; build directory.
690 (substitute* "pri/utils.pri"
691 (("error\\(") "message("))
692
693 (let ((out (assoc-ref outputs "out")))
694 (invoke "qmake"
695 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib")
696 (string-append "PREFIX=" out)
697 "phoenix.pro")))))))
3d5fd240 698 (inputs
a2b99351
DC
699 `(("qtbase" ,qtbase)
700 ("qtserialport" ,qtserialport)
701 ("qtsvg" ,qtsvg)
7cdc7e57 702 ("libgit2" ,libgit2)
3d5fd240
RW
703 ("boost" ,boost)
704 ("zlib" ,zlib)
705 ("fritzing-parts-db"
706 ,(origin
7cdc7e57
RW
707 (method git-fetch)
708 (uri (git-reference
b0e7b699 709 (url "https://github.com/fritzing/fritzing-parts")
7cdc7e57
RW
710 (commit version)))
711 (file-name (git-file-name "fritzing-parts" version))
3d5fd240
RW
712 (sha256
713 (base32
7cdc7e57 714 "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
cfff0b38 715 (home-page "https://fritzing.org")
3d5fd240
RW
716 (synopsis "Electronic circuit design")
717 (description
718 "The Fritzing application is @dfn{Electronic Design Automation} (EDA)
719software with a low entry barrier, suited for the needs of makers and
720hobbyists. It offers a unique real-life \"breadboard\" view, and a parts
721library with many commonly used high-level components. Fritzing makes it very
722easy to communicate about circuits, as well as to turn them into PCB layouts
723ready for production.")
724 ;; Documentation and parts are released under CC-BY-SA 3.0; source code is
725 ;; released under GPLv3+.
726 (license (list license:gpl3+ license:cc-by-sa3.0))))
727
95283f3f
RW
728(define-public gerbv
729 (package
730 (name "gerbv")
0b2db013 731 (version "2.7.0")
95283f3f
RW
732 (source (origin
733 (method url-fetch)
734 (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-"
735 version "/gerbv-" version ".tar.gz"))
736 (sha256
737 (base32
0b2db013 738 "1d2k43k7i4yvbpi4sw1263a8d0q98z2n7aqhmpinpkih8a681vn5"))))
95283f3f 739 (build-system gnu-build-system)
95283f3f 740 (native-inputs
0b2db013 741 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
9abc5863 742 ("desktop-file-utils" ,desktop-file-utils)
0b2db013 743 ("pkg-config" ,pkg-config)))
95283f3f
RW
744 (inputs
745 `(("cairo" ,cairo)
9abc5863 746 ("gtk" ,gtk+-2)))
95283f3f
RW
747 (home-page "http://gerbv.geda-project.org/")
748 (synopsis "Gerber file viewer")
749 (description
750 "Gerbv is a viewer for files in the Gerber format (RS-274X only), which
751is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets
752you load several files on top of each other, do measurements on the displayed
753image, etc. Besides viewing Gerbers, you may also view Excellon drill files
754as well as pick-place files.")
755 (license license:gpl2+)))
4534d85e 756
847768b9
RW
757(define-public translate2geda
758 ;; There has been no formal release yet.
759 (let ((commit "4c19e7eefa338cea8f1ee999ea8b37f8d0698169")
760 (revision "1"))
761 (package
762 (name "translate2geda")
763 (version (git-version "0" revision commit))
764 (source (origin
765 (method git-fetch)
766 (uri (git-reference
b0e7b699 767 (url "https://github.com/erichVK5/translate2geda")
847768b9
RW
768 (commit commit)))
769 (file-name (git-file-name name version))
770 (sha256
771 (base32
772 "1h062bbpw8nk0jamkya1k4lsgaia796jyviiz2gkdi6k1bxhwgpa"))))
773 (build-system ant-build-system)
774 (arguments
775 `(#:tests? #f ; there are no tests
776 #:jar-name "translate2geda.jar"
777 #:source-dir "."
778 #:main-class "translate2geda"
779 #:phases
780 (modify-phases %standard-phases
781 (add-after 'install 'install-bin
782 (lambda* (#:key inputs outputs #:allow-other-keys)
783 (let* ((out (assoc-ref outputs "out"))
784 (bin (string-append out "/bin"))
785 (wrapper (string-append bin "/translate2geda")))
786 (mkdir-p bin)
787 (with-output-to-file wrapper
788 (lambda _
789 (format #t "#!/bin/sh~%exec ~a -jar ~a/share/java/translate2geda.jar"
790 (which "java") out)))
791 (chmod wrapper #o555))
792 #t)))))
793 (home-page "https://github.com/erichVK5/translate2geda")
794 (synopsis "Utility for converting symbol and footprint formats to gEDA")
795 (description
796 "This package provides a utility for converting Kicad (@file{.mod},
797@file{.lib}), Eagle (@file{.lbr}), gerber (@file{.gbr}, etc..),
798BXL (@file{.bxl}), IBIS (@file{.ibs}), symdef, LT-Spice (@file{.asc}),
799QUCS (@file{.sch}), and BSDL (@file{.bsd}) symbols and footprints and EggBot
800fonts to gEDA.")
801 (license license:gpl2+))))
802
28f4d56d 803(define-public libfive
dd012afd
RW
804 (let ((commit "8ca1b8685ef3fac7b64e66b10459b8421a3020c6")
805 (revision "4"))
4534d85e 806 (package
28f4d56d 807 (name "libfive")
007c75f5 808 (version (git-version "0" revision commit))
4534d85e
LC
809 (source (origin
810 (method git-fetch)
811 (uri (git-reference
28f4d56d 812 (url "https://github.com/libfive/libfive")
4534d85e
LC
813 (commit commit)))
814 (sha256
815 (base32
dd012afd 816 "1c762cd70iv2b9av0l9lq0py9138y98wk3dirhdmil7jncdhvq98"))
d2ec1f8e 817 (file-name (git-file-name name version))))
4534d85e
LC
818 (build-system cmake-build-system)
819 (arguments
0818c01a 820 `(#:test-target "libfive-test"
4534d85e
LC
821 #:phases
822 (modify-phases %standard-phases
007c75f5
EB
823 (add-after 'unpack 'remove-native-compilation
824 (lambda _
825 (substitute* "CMakeLists.txt" (("-march=native") ""))
0818c01a 826 #t)))))
4534d85e
LC
827 (native-inputs
828 `(("pkg-config" ,pkg-config)))
829 (inputs
830 `(("boost" ,boost)
4534d85e 831 ("libpng" ,libpng)
28f4d56d 832 ("qtbase" ,qtbase)
4534d85e 833 ("eigen" ,eigen)
dd012afd 834 ("guile" ,guile-3.0)))
28f4d56d 835 (home-page "https://libfive.com")
4534d85e
LC
836 (synopsis "Tool for programmatic computer-aided design")
837 (description
28f4d56d
RW
838 "Libfive is a tool for programmatic computer-aided design (CAD). In
839libfive, solid models are defined as Scheme scripts, and there are no opaque
840function calls into the geometry kernel: everything is visible to the user.
841Even fundamental, primitive shapes are represented as code in the user-level
4534d85e 842language.")
6a0b9500 843 (license (list license:mpl2.0 ;library
28f4d56d
RW
844 license:gpl2+))))) ;Guile bindings and GUI
845
ef897e9a
RW
846(define-public inspekt3d
847 (let ((commit "703f52ccbfedad2bf5240bf8183d1b573c9d54ef")
848 (revision "0"))
849 (package
850 (name "inspekt3d")
851 (version (git-version "0" revision commit))
852 (source (origin
853 (method git-fetch)
854 (uri (git-reference
855 (url "https://gitlab.com/kavalogic-inc/inspekt3d.git")
856 (commit commit)))
857 (file-name (git-file-name name version))
858 (sha256
859 (base32
4e9b2e8b
RW
860 "0lan6930g5a9z4ack9jj0zdd0mb2s6q2xzpiwcjdc3pvl9b1nbw4"))
861 (modules '((guix build utils)))
862 (snippet
863 '(begin
864 ;; Allow builds with Guile 3.0.
865 (substitute* "configure.ac"
866 (("2\\.2") "3.0 2.2"))
867 #t))))
ef897e9a
RW
868 (build-system gnu-build-system)
869 (arguments
870 `(#:phases
871 (modify-phases %standard-phases
872 (add-after 'unpack 'patch-libfive-guile-location
873 (lambda* (#:key inputs #:allow-other-keys)
874 (substitute* "inspekt3d/library.scm"
875 (("\"libfive-guile")
876 (string-append "\""
877 (assoc-ref inputs "libfive")
878 "/lib/libfive-guile")))
879 #t)))))
880 (native-inputs
881 `(("autoconf" ,autoconf)
882 ("automake" ,automake)
883 ("pkg-config" ,pkg-config)))
884 (inputs
885 `(("mesa" ,mesa)
4e9b2e8b 886 ("guile" ,guile-3.0)))
ef897e9a
RW
887 (propagated-inputs
888 `(("libfive" ,libfive)
4e9b2e8b 889 ("guile-opengl" ,guile3.0-opengl)))
ef897e9a
RW
890 (home-page "https://gitlab.com/kavalogic-inc/inspekt3d/")
891 (synopsis "Lightweight 3D viewer for Libfive written in Guile Scheme")
892 (description
893 "Inspekt3d is a lightweight 3D viewer for Libfive written in Guile Scheme.
894The viewer can be used interactively with a REPL (for example Geiser in
895Emacs).")
896 (license license:gpl3+))))
897
befc9ff6 898(define-public kicad
e7075353
BW
899 (package
900 (name "kicad")
0094c4fa 901 (version "5.1.6")
e7075353
BW
902 (source
903 (origin
0094c4fa
TGR
904 (method git-fetch)
905 (uri (git-reference
906 (url "https://gitlab.com/kicad/code/kicad.git")
907 (commit version)))
e7075353 908 (sha256
0094c4fa
TGR
909 (base32 "1pa3z0h0679jmgxlzc833h6q85b5paxdp69kf2h93vkaryj58622"))
910 (file-name (git-file-name name version))))
e7075353
BW
911 (build-system cmake-build-system)
912 (arguments
913 `(#:out-of-source? #t
914 #:tests? #f ; no tests
915 #:build-type "Release"
916 #:configure-flags
917 (list "-DKICAD_SCRIPTING_PYTHON3=ON"
918 "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON"
919 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE")
920 #:phases
921 (modify-phases %standard-phases
922 (add-after 'install 'install-translations
923 (lambda* (#:key inputs outputs #:allow-other-keys)
cb014f64 924 (copy-recursively (assoc-ref inputs "kicad-i18n")
e7075353
BW
925 (assoc-ref outputs "out"))
926 #t))
927 (add-after 'install 'wrap-program
928 ;; Ensure correct Python at runtime.
929 (lambda* (#:key inputs outputs #:allow-other-keys)
930 (let* ((out (assoc-ref outputs "out"))
931 (python (assoc-ref inputs "python"))
932 (file (string-append out "/bin/kicad"))
933 (path (string-append
934 out
935 "/lib/python"
936 ,(version-major+minor
937 (package-version python))
938 "/site-packages:"
939 (getenv "PYTHONPATH"))))
940 (wrap-program file
941 `("PYTHONPATH" ":" prefix (,path))
942 `("PATH" ":" prefix
943 (,(string-append python "/bin:")))))
944 #t)))))
945 (native-search-paths
946 (list (search-path-specification
bf51c1af
BW
947 (variable "KICAD") ; to find kicad-doc
948 (files '("")))
949 (search-path-specification
e7075353
BW
950 (variable "KICAD_TEMPLATE_DIR")
951 (files '("share/kicad/template")))
952 (search-path-specification
953 (variable "KICAD_SYMBOL_DIR") ; symbol path
954 (files '("share/kicad/library")))
955 (search-path-specification
956 (variable "KISYSMOD") ; footprint path
957 (files '("share/kicad/modules")))
958 (search-path-specification
959 (variable "KISYS3DMOD") ; 3D model path
960 (files '("share/kicad/modules/packages3d")))))
961 (native-inputs
962 `(("boost" ,boost)
963 ("desktop-file-utils" ,desktop-file-utils)
f2d97d57 964 ("gettext" ,gettext-minimal)
cb014f64 965 ("kicad-i18n" ,kicad-i18n)
e7075353
BW
966 ("pkg-config" ,pkg-config)
967 ("swig" ,swig)
968 ("zlib" ,zlib)))
969 (inputs
970 `(("cairo" ,cairo)
971 ("curl" ,curl)
972 ("glew" ,glew)
973 ("glm" ,glm)
974 ("hicolor-icon-theme" ,hicolor-icon-theme)
975 ("libngspice" ,libngspice)
976 ("libsm" ,libsm)
977 ("mesa" ,mesa)
978 ("opencascade-oce" ,opencascade-oce)
979 ("openssl" ,openssl)
980 ("python" ,python-wrapper)
981 ("wxwidgets" ,wxwidgets)
982 ("wxpython" ,python-wxpython)))
983 (home-page "https://kicad-pcb.org/")
984 (synopsis "Electronics Design Automation Suite")
985 (description "Kicad is a program for the formation of printed circuit
befc9ff6
TF
986boards and electrical circuits. The software has a number of programs that
987perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing
988electrical diagrams), gerbview (viewing Gerber files) and others.")
e7075353 989 (license license:gpl3+)))
8f528bd4 990
cb014f64 991(define kicad-i18n
e7075353 992 (package
cb014f64 993 (name "kicad-i18n")
1c9403f6 994 (version (package-version kicad))
e7075353
BW
995 (source (origin
996 (method git-fetch)
997 (uri (git-reference
998 (url "https://gitlab.com/kicad/code/kicad-i18n.git")
999 (commit version)))
1000 (file-name (git-file-name name version))
1001 (sha256
1002 (base32
02d1bc6b 1003 "0qryi8xjm23ka363zfl7bbga0v5c31fr3d4nyxp3m168vkv9zhha"))))
e7075353
BW
1004 (build-system cmake-build-system)
1005 (arguments
1006 `(#:phases
1007 (modify-phases %standard-phases
1008 (delete 'build)
1009 (delete 'check))))
1010 (native-inputs
f2d97d57 1011 `(("gettext" ,gettext-minimal)))
1c9403f6 1012 (home-page (package-home-page kicad))
e7075353
BW
1013 (synopsis "KiCad GUI translations")
1014 (description "This package contains the po files that are used for the GUI
1015translations for KiCad.")
1016 (license license:gpl3+)))
5f947808 1017
cb014f64
TGR
1018(define-public kicad-i18l
1019 (deprecated-package "kicad-i18l" kicad-i18n))
1020
bf51c1af
BW
1021(define-public kicad-doc
1022 (package
1023 (name "kicad-doc")
1024 (version "5.1.6")
1025 (source (origin
1026 (method git-fetch)
1027 (uri (git-reference
1028 (url "https://gitlab.com/kicad/services/kicad-doc.git")
1029 (commit version)))
1030 (file-name (git-file-name name version))
1031 (sha256
1032 (base32
1033 "03kvss8a0xrjnfvkwymm0vfd7rn9ix7i926xdzz9jg9iycrjfj3g"))))
1034 (build-system cmake-build-system)
1035 (arguments
1036 `(#:configure-flags (list "-DBUILD_FORMATS=html")
1037 #:phases
1038 (modify-phases %standard-phases
1039 (delete 'build)
1040 (add-before 'install 'set-perl-env
1041 (lambda* (#:key inputs #:allow-other-keys)
1042 (setenv "PERL5LIB"
1043 (string-append (assoc-ref inputs "perl-unicode-linebreak")
1044 "/lib/perl5/site_perl" ":"
1045 (getenv "PERL5LIB")))
1046 #t))
1047 (delete 'check))))
1048 (native-inputs
1049 `(("asciidoc" ,asciidoc)
1050 ("gettext" ,gettext-minimal)
1051 ("git" ,git-minimal)
1052 ("perl" ,perl)
1053 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1054 ("po4a" ,po4a)
1055 ("source-highlight" ,source-highlight)))
1056 (home-page "https://kicad.org")
1057 (synopsis "KiCad official documentation")
1058 (description "This repository contains the official KiCad documentation.")
1059 (license license:gpl3+)))
1060
47f9fb18
DM
1061(define-public kicad-symbols
1062 (package
1063 (name "kicad-symbols")
1c9403f6 1064 (version (package-version kicad))
47f9fb18
DM
1065 (source (origin
1066 (method git-fetch)
1067 (uri (git-reference
b0e7b699 1068 (url "https://github.com/KiCad/kicad-symbols")
47f9fb18 1069 (commit version)))
a5544621 1070 (file-name (git-file-name name version))
47f9fb18
DM
1071 (sha256
1072 (base32
3ef7c588 1073 "12w3rdy085drlikkpb27n9ni7cyg9l0pqy7hnr86cxjcw3l5wcx6"))))
47f9fb18
DM
1074 (build-system cmake-build-system)
1075 (arguments
261e0356 1076 `(#:tests? #f)) ; no tests exist
1c9403f6 1077 (home-page (package-home-page kicad))
badc3c67 1078 (synopsis "Official KiCad schematic symbol libraries")
47f9fb18 1079 (description "This package contains the official KiCad schematic symbol
badc3c67 1080libraries.")
261e0356
TGR
1081 ;; TODO: Exception: "To the extent that the creation of electronic designs
1082 ;; that use 'Licensed Material' can be considered to be 'Adapted Material',
1083 ;; then the copyright holder waives article 3 of the license with respect to
1084 ;; these designs and any generated files which use data provided as part of
1085 ;; the 'Licensed Material'."
47f9fb18
DM
1086 ;; See <https://github.com/KiCad/kicad-symbols/blob/master/LICENSE.md>.
1087 (license license:cc-by-sa4.0)))
1088
259e65aa
BW
1089(define-public kicad-footprints
1090 (package
1091 (inherit kicad-symbols)
1092 (name "kicad-footprints")
1c9403f6 1093 (version (package-version kicad))
259e65aa
BW
1094 (source (origin
1095 (method git-fetch)
1096 (uri (git-reference
b0e7b699 1097 (url "https://github.com/KiCad/kicad-footprints")
259e65aa
BW
1098 (commit version)))
1099 (file-name (git-file-name name version))
1100 (sha256
1101 (base32
47711ec9 1102 "1kmf91a5mmvj9izrv40mkaw1w36yjgn8daczd9rq2wlmd0rdp1zx"))))
259e65aa
BW
1103 (synopsis "Official KiCad footprint libraries")
1104 (description "This package contains the official KiCad footprint libraries.")))
1105
c5951507
BW
1106(define-public kicad-packages3d
1107 (package
1108 (inherit kicad-symbols)
1109 (name "kicad-packages3d")
1c9403f6 1110 (version (package-version kicad))
c5951507
BW
1111 (source (origin
1112 (method git-fetch)
1113 (uri (git-reference
b0e7b699 1114 (url "https://github.com/KiCad/kicad-packages3d")
c5951507
BW
1115 (commit version)))
1116 (file-name (git-file-name name version))
1117 (sha256
1118 (base32
57b90a5d 1119 "0b9jglf77fy0n0r8xs4yqkv6zvipyfvp0z5dnqlzp32csy5aqpi1"))))
c5951507
BW
1120 (synopsis "Official KiCad 3D model libraries")
1121 (description "This package contains the official KiCad 3D model libraries.")))
1122
ca839f3c
BW
1123(define-public kicad-templates
1124 (package
1125 (inherit kicad-symbols)
1126 (name "kicad-templates")
1c9403f6 1127 (version (package-version kicad))
ca839f3c
BW
1128 (source (origin
1129 (method git-fetch)
1130 (uri (git-reference
b0e7b699 1131 (url "https://github.com/KiCad/kicad-templates")
ca839f3c
BW
1132 (commit version)))
1133 (file-name (git-file-name name version))
1134 (sha256
1135 (base32
fbfaafae 1136 "1hppcsrkn4dk6ggby6ckh0q65qxkywrbyxa4lwpaf7pxjyv498xg"))))
ca839f3c
BW
1137 (synopsis "Official KiCad project and worksheet templates")
1138 (description "This package contains the official KiCad project and
1139worksheet templates.")))
1140
5f947808
JD
1141(define-public linsmith
1142 (package
1143 (name "linsmith")
d193903e 1144 (version "0.99.31")
5f947808
JD
1145 (source (origin
1146 (method url-fetch)
1147 (uri (string-append
1148 "mirror://sourceforge/linsmith/linsmith/linsmith-"
1149 version "/linsmith-" version ".tar.gz"))
1150 (sha256
1151 (base32
d193903e 1152 "13qj7n9826qc9shkkgd1p6vcpj78v4h9d67wbg45prg7rbnzkzds"))))
5f947808
JD
1153 (build-system gnu-build-system)
1154 (native-inputs
1155 `(("pkg-config" ,pkg-config)
1156 ("gtk" ,gtk+-2)
1157 ("libgnome" ,libgnomeui)))
6e3d48c2 1158 (home-page "https://jcoppens.com/soft/linsmith/index.en.php")
5f947808
JD
1159 (synopsis "Smith Charting program")
1160 (description "LinSmith is a Smith Charting program, mainly designed for
1161educational use. As such, there is an emphasis on capabilities that improve
1162the 'showing the effect of'-style of operation.")
1163 (license license:gpl2+)))
2766f9e8
DM
1164
1165(define-public volk
1166 (package
1167 (name "volk")
8b46a7e3 1168 (version "2.4.1")
2766f9e8
DM
1169 (source
1170 (origin
fc14661c
TGR
1171 (method git-fetch)
1172 (uri (git-reference
1173 (url "https://github.com/gnuradio/volk")
6a18f4c5
TGR
1174 (commit (string-append "v" version))
1175 (recursive? #t))) ; for cpu_features git submodule
fc14661c 1176 (file-name (git-file-name name version))
2766f9e8 1177 (sha256
8b46a7e3 1178 (base32 "1mkqiw0i2fbbsk46zvk8yv5swl7ifhq6y1dlfphq8dsmkvxckqby"))))
2766f9e8 1179 (build-system cmake-build-system)
01a2911e
EF
1180 (arguments
1181 `(#:phases
1182 (modify-phases %standard-phases
8da64e9b
TGR
1183 (add-after 'install 'remove-static-libraries
1184 ;; Remove libcpu_features.a (and any others that might appear).
1185 (lambda* (#:key outputs #:allow-other-keys)
1186 (let* ((out (assoc-ref outputs "out"))
1187 (lib (string-append out "/lib")))
1188 (for-each delete-file (find-files lib "\\.a$"
1189 #:fail-on-error? #t))
1190 #t)))
01a2911e
EF
1191 (add-after 'install 'wrap-pythonpath
1192 (lambda* (#:key inputs outputs #:allow-other-keys)
1193 (let* ((out (assoc-ref outputs "out"))
1194 (python (assoc-ref inputs "python"))
1195 (file (string-append out "/bin/volk_modtool"))
1196 (path (string-append
1197 out
1198 "/lib/python"
1199 ,(version-major+minor
1200 (package-version python))
1201 "/site-packages:"
1202 (getenv "PYTHONPATH"))))
1203 (wrap-program file
1204 `("PYTHONPATH" ":" prefix (,path))
1205 `("PATH" ":" prefix
1206 (,(string-append python "/bin:")))))
1207 #t)))))
2766f9e8 1208 (inputs
a3370b30
TGR
1209 `(("boost" ,boost)
1210 ("python" ,python-wrapper)
01a2911e
EF
1211 ("python-mako" ,python-mako)))
1212 (home-page "https://www.libvolk.org/")
2766f9e8
DM
1213 (synopsis "Vector-Optimized Library of Kernels")
1214 (description
4df47410
TGR
1215 "@acronym{VOLK, Vector-Optimized Library of Kernels} contains procedures
1216with machine-specific optimizations for mathematical functions. It also
1217provides a machine-independent interface to select the best such procedures to
1218use on a given system.")
2766f9e8 1219 (license license:gpl3+)))
f37f949d 1220
07d859cc
VM
1221(define-public libredwg
1222 (package
1223 (name "libredwg")
cd7bd1cc 1224 (version "0.12.3")
07d859cc
VM
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (string-append "mirror://gnu/libredwg/libredwg-"
1229 version ".tar.xz"))
1230 (sha256
cd7bd1cc 1231 (base32 "1vhm3r3zr8hh0jbvv6qdykh1x14r4c1arl1qj48i4cx2dd3366mk"))))
07d859cc
VM
1232 (build-system gnu-build-system)
1233 (arguments
1234 `(#:configure-flags '("--disable-bindings")))
1235 (native-inputs
1236 `(("libxml2" ,libxml2)
1237 ("parallel" ,parallel)
e1da617a 1238 ("perl" ,perl)
07d859cc 1239 ("pkg-config" ,pkg-config)
e1da617a 1240 ("python" ,python-wrapper)
07d859cc
VM
1241 ("python-libxml2" ,python-libxml2)))
1242 (inputs
1243 `(("pcre2" ,pcre2)))
1244 (home-page "https://www.gnu.org/software/libredwg/")
1245 (synopsis "C library to handle DWG (CAD-related) files")
1246 (description
1247 "GNU LibreDWG is a C library to handle DWG files. It aims to be a free
1248replacement for the OpenDWG libraries.")
1249 (license license:gpl3+)))
1250
f37f949d
DM
1251(define-public minicom
1252 (package
1253 (name "minicom")
254b3310 1254 (version "2.8")
f37f949d
DM
1255 (source
1256 (origin
2f04eb48
TGR
1257 (method git-fetch)
1258 (uri (git-reference
1259 (url "https://salsa.debian.org/minicom-team/minicom.git")
1260 (commit (string-append "v" version))))
f37f949d 1261 (sha256
254b3310 1262 (base32 "0kfihxbh9qkjk9m1932ajyqx384c2aj3d9yaphh3i9i7y1shxlpx"))
2f04eb48 1263 (file-name (git-file-name name version))))
f37f949d
DM
1264 (build-system gnu-build-system)
1265 (arguments
1266 `(#:configure-flags '("--enable-lock-dir=/var/lock")
1267 #:phases
1268 (modify-phases %standard-phases
254b3310
TGR
1269 (add-after 'unpack 'make-git-checkout-writable
1270 (lambda _
1271 (for-each make-file-writable (find-files "."))))
2f04eb48
TGR
1272 (replace 'bootstrap
1273 ;; autogen.sh needlessly hard-codes aclocal-1.14.
1274 (lambda _
1275 (invoke "autoreconf" "-vif")
1276 #t))
1277 (add-before 'configure 'patch-lock-check
f37f949d
DM
1278 (lambda _
1279 (substitute* "configure"
1280 (("test -d [$]UUCPLOCK") "true"))
1281 #t)))))
2f04eb48
TGR
1282 (native-inputs
1283 `(("autoconf" ,autoconf)
1284 ("automake" ,automake)
1285 ("gettext" ,gettext-minimal)
1286 ("pkg-config" ,pkg-config)))
f37f949d
DM
1287 (inputs
1288 `(("ncurses" ,ncurses)))
2f04eb48 1289 (home-page "https://salsa.debian.org/minicom-team/minicom")
f37f949d
DM
1290 (synopsis "Serial terminal emulator")
1291 (description "@code{minicom} is a serial terminal emulator.")
1292 (license license:gpl2+)))
1251c664
TF
1293
1294(define-public harminv
1295 (package
1296 (name "harminv")
b09c6b55 1297 (version "1.4.1")
1251c664
TF
1298 (source (origin
1299 (method url-fetch)
1300 (uri
b09c6b55
TGR
1301 (string-append "https://github.com/stevengj/harminv/"
1302 "releases/download/v" version "/"
1303 name "-" version ".tar.gz"))
1251c664
TF
1304 (sha256
1305 (base32
b09c6b55 1306 "0w1n4d249vlpda0hi6z1v13qp21vlbp3ykn0m8qg4rd5132j7fg1"))))
1251c664
TF
1307 (build-system gnu-build-system)
1308 (arguments
1618c6fe
JB
1309 `(#:configure-flags '("--enable-shared")
1310 #:phases
1251c664
TF
1311 (modify-phases %standard-phases
1312 (add-before 'configure 'fix-tests
1313 (lambda _
1314 (substitute* "./sines-test.sh"
1315 ; change test frequency range - default fails
1316 (("0\\.15") "0.16"))
1317 #t)))))
1318 (native-inputs
1319 `(("fortran" ,gfortran)))
1320 (inputs
1321 `(("lapack" ,lapack)))
b09c6b55 1322 (home-page "https://github.com/stevengj/harminv")
1251c664
TF
1323 (synopsis "Harmonic inversion solver")
1324 (description
1325 "Harminv is a free program (and accompanying library) to solve the problem of
1326harmonic inversion — given a discrete-time, finite-length signal that consists of a sum
1327of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
1328determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
1329 (license license:gpl2+)))
cbd9568f
TF
1330
1331(define-public guile-libctl
1332 (package
1333 (name "guile-libctl")
a7de5a50 1334 (version "4.2.0")
cbd9568f
TF
1335 (source (origin
1336 (method url-fetch)
1337 (uri
1338 (string-append
a7de5a50
JB
1339 "https://github.com/NanoComp/libctl/releases/download/v"
1340 version "/libctl-" version ".tar.gz"))
cbd9568f
TF
1341 (sha256
1342 (base32
a7de5a50 1343 "0x8r56lpfq83kfbq28vr25icl19xpfd6fjrxzcpdmv30l9pash83"))))
cbd9568f 1344 (build-system gnu-build-system)
a7de5a50
JB
1345 (arguments
1346 `(#:configure-flags '("--enable-shared")))
cbd9568f
TF
1347 (native-inputs
1348 `(("fortran" ,gfortran)))
1349 (inputs
1350 `(("guile" ,guile-2.2)))
1351 (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl")
1352 (synopsis "Flexible control files implementation for scientific simulations")
1353 (description
1354 "Libctl is a Guile-based library implementing flexible control files
1355for scientific simulations.")
1356 (license license:gpl2+)))
5e872d4b
TF
1357
1358(define-public mpb
1359 (package
1360 (name "mpb")
e719562d 1361 (version "1.8.0")
5e872d4b
TF
1362 (source (origin
1363 (method url-fetch)
1364 (uri
1365 (string-append
e719562d
JB
1366 "https://github.com/NanoComp/mpb/releases/download/v"
1367 version "/mpb-" version ".tar.gz"))
5e872d4b
TF
1368 (sha256
1369 (base32
e719562d 1370 "1jgrb7dd6qs6j6y1gnxmdgrh79l2bvqa6nk60a4pw1annsks4brd"))))
5e872d4b
TF
1371 (build-system gnu-build-system)
1372 (arguments
1373 `(#:configure-flags
1374 (list (string-append "--with-libctl="
1375 (assoc-ref %build-inputs "libctl")
e719562d
JB
1376 "/share/libctl")
1377 "--enable-shared")))
5e872d4b
TF
1378 (native-inputs
1379 `(("fortran" ,gfortran)
1380 ("pkg-config" ,pkg-config)
1381 ("swig" ,swig)))
1382 (inputs
1383 `(("fftw" ,fftw)
1384 ("gsl" ,gsl)
1385 ("guile" ,guile-2.2)
1386 ("hdf5" ,hdf5)
1387 ("lapack" ,lapack)
1388 ("libctl" ,guile-libctl)
1389 ("readline" ,readline)
1390 ("zlib" ,zlib)))
1391 (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands")
1392 (synopsis "Computes band structures and electromagnetic modes of dielectric
1393structures")
1394 (description
1395 "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes)
1396of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
1397fully-vectorial and three-dimensional methods.")
1398 (license license:gpl2+)))
28b08d2a
TF
1399
1400(define-public meep
1401 (package
1402 (name "meep")
138950a8 1403 (version "1.8.0")
28b08d2a
TF
1404 (source (origin
1405 (method url-fetch)
1406 (uri
1407 (string-append
138950a8
JB
1408 "https://github.com/NanoComp/meep/releases/download/v"
1409 version "/meep-" version ".tar.gz"))
28b08d2a
TF
1410 (sha256
1411 (base32
138950a8 1412 "14zyxmm3p80j5fz5b89sl7hgkgcisqjny5hjh4pi274ziqjqz8bm"))))
28b08d2a
TF
1413 (build-system gnu-build-system)
1414 (arguments
1415 `(#:configure-flags
1416 (list (string-append "--with-libctl="
1417 (assoc-ref %build-inputs "libctl")
1418 "/share/libctl"))))
1419 (native-inputs
1420 `(("fortran" ,gfortran)
1421 ("pkg-config" ,pkg-config)
1422 ("swig" ,swig)))
1423 (inputs
1424 `(("fftw" ,fftw)
1425 ("gsl" ,gsl)
138950a8 1426 ("guile" ,guile-2.2)
28b08d2a
TF
1427 ("harminv" ,harminv)
1428 ("hdf5" ,hdf5)
1429 ("lapack" ,lapack)
1430 ("libctl" ,guile-libctl)
1431 ("mpb" ,mpb)
1432 ("zlib" ,zlib)))
1433 (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep")
1434 (synopsis "Finite-difference time-domain (FDTD) simulation software")
1435 (description
1436 "Meep is a finite-difference time-domain (FDTD) simulation software package
1437developed at MIT to model electromagnetic systems.")
1438 (license license:gpl2+)))
8bca358b
TF
1439
1440(define-public adms
1441 (package
1442 (name "adms")
de4705d9 1443 (version "2.3.7")
8bca358b 1444 (source (origin
de4705d9
MS
1445 (method git-fetch)
1446 (uri (git-reference
1447 (url "https://github.com/Qucs/ADMS")
1448 (commit (string-append "release-" version))))
1449 (file-name (git-file-name name version))
8bca358b
TF
1450 (sha256
1451 (base32
de4705d9 1452 "0i37c9k6q1iglmzp9736rrgsnx7sw8xn3djqbbjw29zsyl3pf62c"))))
8bca358b
TF
1453 (build-system gnu-build-system)
1454 (native-inputs
de4705d9
MS
1455 `(("autoconf" ,autoconf)
1456 ("automake" ,automake)
1457 ("bison" ,bison)
1458 ("flex" ,flex)
1459 ("libtool" ,libtool)
1460 ("perl" ,perl)
1461 ("perl-xml-libxml" ,perl-xml-libxml)))
1462 (home-page "https://github.com/Qucs/ADMS")
8bca358b
TF
1463 (synopsis "Automatic device model synthesizer")
1464 (description
1465 "ADMS is a code generator that converts electrical compact device models
1466specified in high-level description language into ready-to-compile C code for
1467the API of spice simulators. Based on transformations specified in XML
1468language, ADMS transforms Verilog-AMS code into other target languages.")
1469 (license license:gpl3)))
6febda94
JL
1470
1471(define-public capstone
1472 (package
1473 (name "capstone")
a7b14a1b 1474 (version "3.0.5")
6febda94 1475 (source (origin
aa5fadaf
EF
1476 (method git-fetch)
1477 (uri (git-reference
1478 (url "https://github.com/aquynh/capstone")
1479 (commit version)))
1480 (file-name (git-file-name name version))
6febda94
JL
1481 (sha256
1482 (base32
aa5fadaf 1483 "0dgf82kxj4rs45d6s8sr984c38sll1n5scpypjlyh21gh2yl4qfw"))))
6febda94
JL
1484 (build-system gnu-build-system)
1485 (arguments
1486 `(#:tests? #f
a7b14a1b 1487 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
6febda94
JL
1488 "CC=gcc")
1489 #:phases
1490 (modify-phases %standard-phases
a7b14a1b
TGR
1491 (delete 'configure) ; no configure script
1492 ;; cstool's Makefile ‘+=’s LDFLAGS, so we cannot pass it as a make flag.
6febda94
JL
1493 (add-before 'build 'fix-cstool-ldflags
1494 (lambda* (#:key outputs #:allow-other-keys)
a7b14a1b
TGR
1495 (setenv "LDFLAGS" (string-append "-Wl,-rpath="
1496 (assoc-ref outputs "out") "/lib"))
6febda94 1497 #t)))))
acf18cb1 1498 (home-page "https://www.capstone-engine.org")
6febda94
JL
1499 (synopsis "Lightweight multi-platform, multi-architecture disassembly framework")
1500 (description
1501 "Capstone is a lightweight multi-platform, multi-architecture disassembly
1502framework. Capstone can disassemble machine code for many supported architectures
1503such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and xcore. It provides
1504bindings for Python, Java, OCaml and more.")
1505 (license license:bsd-3)))
f70be011
JL
1506
1507;; FIXME: This package has a timestamp embedded in
1508;; lib/python3.5/site-packages/capstone/__pycache__/__iti__.cpython-35.pyc
1509(define-public python-capstone
1510 (package
1511 (inherit capstone)
1512 (name "python-capstone")
1513 (propagated-inputs
1514 `(("capstone" ,capstone)))
1515 (build-system python-build-system)
1516 (arguments
1517 `(#:phases
1518 (modify-phases %standard-phases
1519 (add-after 'unpack 'chdir-and-fix-setup-py
1520 (lambda _
1521 (chdir "bindings/python")
1522 ;; Do not build the library again, because we already have it.
1523 (substitute* "setup.py" ((".* build_libraries.*") ""))
1524 ;; This substitution tells python-capstone where to find the
1525 ;; library.
1526 (substitute* "capstone/__init__.py"
1527 (("pkg_resources.resource_filename.*")
1528 (string-append "'" (assoc-ref %build-inputs "capstone") "/lib',\n")))
1529 #t)))))))
1530
1531(define-public python2-capstone
1532 (package-with-python2 python-capstone))
44669577 1533
c1da9829 1534
1535(define-public python-esptool-3.0
1536 (package
1537 (name "python-esptool")
1538 (version "3.0")
1539 (source
1540 (origin
1541 (method url-fetch)
1542 (uri (pypi-uri "esptool" version))
1543 (sha256
1544 (base32
1545 "0d69rd9h8wrzjvfrc66vmz4qd5hly2fpdcwj2bdrlb7dbwikv5c7"))))
1546 (build-system python-build-system)
1547 (arguments
1548 `(#:tests? #f)) ;XXX: require python-reedsolo
1549 (propagated-inputs
1550 `(("python-ecdsa" ,python-ecdsa)
1551 ("python-pyaes" ,python-pyaes)
1552 ("python-pyserial" ,python-pyserial)))
1553 (home-page "https://github.com/espressif/esptool")
1554 (synopsis "Bootloader utility for Espressif ESP8266 & ESP32 chips")
1555 (description
1556 "@code{esptool.py} is a Python-based utility to communicate with the ROM
1557bootloader in Espressif ESP8266 & ESP32 series chips.")
1558 (license license:gpl2+)))
1559
44669577
JL
1560(define-public radare2
1561 (package
1562 (name "radare2")
85da3f52 1563 (version "5.1.1")
44669577 1564 (source (origin
fcc10cb2 1565 (method git-fetch)
1566 (uri (git-reference
1567 (url "https://github.com/radareorg/radare2")
1568 (commit version)))
44669577
JL
1569 (sha256
1570 (base32
85da3f52 1571 "0hv9x31iabasj12g8f04incr1rbcdkxi3xnqn3ggp8gl4h6pf2f3"))
6454e5ac 1572 (file-name (git-file-name name version))))
44669577
JL
1573 (build-system gnu-build-system)
1574 (arguments
8dec0cdf 1575 '(#:tests? #f ; tests require git and network access
44669577
JL
1576 #:phases
1577 (modify-phases %standard-phases
1578 (add-before 'configure 'mklibdir
655a0c65
TGR
1579 (lambda* (#:key inputs outputs #:allow-other-keys)
1580 (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))
44669577
JL
1581 #t)))
1582 #:configure-flags
ecc8cd98
TGR
1583 (list "--with-openssl"
1584 "--with-rpath"
1585 "--with-syscapstone"
1586 "--with-sysmagic"
1587 "--with-syszip"
1588 "--with-sysxxhash")
44669577
JL
1589 #:make-flags
1590 (list "CC=gcc")))
5507ff8e 1591 ;; TODO: Add gmp and libzip and make the build system actually find them.
44669577 1592 (inputs
5507ff8e 1593 `(("capstone" ,capstone)
ecc8cd98 1594 ("libuv" ,libuv)
5507ff8e
TGR
1595 ("openssl" ,openssl)
1596 ("zip" ,zip)))
44669577
JL
1597 (native-inputs
1598 `(("pkg-config" ,pkg-config)))
ecc8cd98
TGR
1599 (propagated-inputs
1600 ;; In the Libs: section of r_hash.pc.
1601 `(("xxhash" ,xxhash)))
44669577 1602 (home-page "https://radare.org/")
74281436 1603 (synopsis "Reverse engineering framework")
44669577 1604 (description
74281436
TGR
1605 "Radare2 is a complete framework for reverse-engineering, debugging, and
1606analyzing binaries. It is composed of a set of small utilities that can be
1607used together or independently from the command line.
1608
1609Radare2 is built around a scriptable disassembler and hexadecimal editor that
1610support a variety of executable formats for different processors and operating
1611systems, through multiple back ends for local and remote files and disk
1612images.
1613
1614It can also compare (@dfn{diff}) binaries with graphs and extract information
1615like relocation symbols. It is able to deal with malformed binaries, making
1616it suitable for security research and analysis.")
44669577 1617 (license license:lgpl3)))
a6edcfaf
TF
1618
1619(define-public asco
1620 (package
1621 (name "asco")
1622 (version "0.4.10")
1623 (source (origin
1624 (method url-fetch)
1625 (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
1626 version ".tar.gz"))
1627 (sha256
1628 (base32
1629 "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
1630 (build-system gnu-build-system)
1631 (arguments
1632 `(#:tests? #f ; no tests
1633 #:make-flags '("all" "asco-mpi")
1634 #:phases
1635 (modify-phases %standard-phases
1636 (delete 'configure)
1637 (add-before 'build 'fix-paths
1638 (lambda* (#:key inputs #:allow-other-keys)
1639 (let ((coreutils (assoc-ref inputs "coreutils-minimal")))
1640 (substitute* '("errfunc.c" "asco.c")
1641 (("cp ")
1642 (string-append coreutils "/bin/cp "))
1643 (("nice")
1644 (string-append coreutils "/bin/nice")))
1645 (substitute* "Makefile"
1646 (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
1647 #t)))
1648 (replace 'install ; no install target
1649 (lambda* (#:key outputs #:allow-other-keys)
1650 (for-each (lambda (file)
1651 (install-file file (string-append
1652 (assoc-ref outputs "out")
1653 "/bin")))
1654 '("asco" "asco-mpi" "asco-test"
1655 "tools/alter/alter" "tools/log/log"))
1656 #t)))))
1657 (native-inputs
1658 `(("mpi" ,openmpi)))
1659 (inputs
1660 `(("coreutils-minimal" ,coreutils-minimal)))
1661 (home-page "http://asco.sourceforge.net/")
1662 (synopsis "SPICE circuit optimizer")
1663 (description
1664 "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
1665high-performance parallel differential evolution (DE) optimization algorithm.")
1666 (license license:gpl2+)))
710cc1a4
TF
1667
1668(define-public libngspice
1669 ;; Note: The ngspice's build system does not allow us to build both the
1670 ;; library and the executables in one go. Thus, we have two packages.
1671 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>.
1672 (package
1673 (name "libngspice")
7a83eb37 1674 (version "28")
710cc1a4
TF
1675 (source (origin
1676 (method url-fetch)
b4731adf
EF
1677 (uri (list
1678 (string-append "mirror://sourceforge/ngspice/ng-spice-rework/"
1679 version "/ngspice-" version ".tar.gz")
1680 (string-append "mirror://sourceforge/ngspice/ng-spice-rework/"
1681 "old-releases/" version
1682 "/ngspice-" version ".tar.gz")))
710cc1a4
TF
1683 (sha256
1684 (base32
7a83eb37 1685 "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l"))
710cc1a4
TF
1686 (modules '((guix build utils)))
1687 ;; We remove the non-free cider and build without it.
1688 (snippet
1689 '(begin
1690 (delete-file-recursively "src/ciderlib")
1691 (delete-file "src/ciderinit")
1692 (substitute* "configure"
1693 (("src/ciderlib/Makefile") "")
1694 (("src/ciderlib/input/Makefile") "")
1695 (("src/ciderlib/support/Makefile") "")
1696 (("src/ciderlib/oned/Makefile") "")
6cbee49d
MW
1697 (("src/ciderlib/twod/Makefile") ""))
1698 #t))))
710cc1a4
TF
1699 (build-system gnu-build-system)
1700 (arguments
1701 `(;; No tests for libngspice exist.
1702 ;; The transient tests for ngspice fail.
1703 #:tests? #f
1704 #:phases
1705 (modify-phases %standard-phases
1706 (add-after 'unpack 'patch-timestamps
1707 (lambda _
1708 (substitute* "configure"
ec425ca3 1709 (("`date`") "Thu Jan 1 00:00:01 UTC 1970"))
710cc1a4
TF
1710 #t))
1711 (add-after 'unpack 'delete-program-manuals
1712 (lambda _
1713 (substitute* "man/man1/Makefile.in"
1714 (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1 ngmultidec\\.1")
1715 "man_MANS = "))
1716 #t))
1717 (add-after 'install 'delete-script-files
1718 (lambda* (#:key outputs #:allow-other-keys)
1719 (delete-file-recursively
1720 (string-append (assoc-ref outputs "out")
1721 "/share/ngspice/scripts")))))
1722 #:configure-flags
1723 (list "--enable-openmp"
1724 "--enable-xspice"
1725 "--with-ngshared"
1726 "--with-readline=yes")))
1727 (native-inputs
1728 `(("bison" ,bison)
1729 ("flex" ,flex)))
1730 (inputs
1731 `(("libxaw" ,libxaw)
1732 ("mpi" ,openmpi)
1733 ("readline" ,readline)))
1734 (home-page "http://ngspice.sourceforge.net/")
1735 (synopsis "Mixed-level/mixed-signal circuit simulator")
1736 (description
1737 "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes
1738@code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that
1739provides code modeling support and simulation of digital components through
1740an embedded event driven algorithm.")
1741 (license (list license:lgpl2.0+ ; code in frontend/numparam
1742 (license:non-copyleft "file:///COPYING") ; spice3 bsd-style
1743 license:public-domain)))) ; xspice
1744
1745(define-public ngspice
1746 ;; The ngspice executables (see libngpsice above.)
1747 (package (inherit libngspice)
1748 (name "ngspice")
1749 (arguments
1750 (substitute-keyword-arguments (package-arguments libngspice)
1751 ((#:configure-flags flags)
1752 `(delete "--with-ngshared" ,flags))
1753 ((#:phases phases)
1754 `(modify-phases ,phases
1755 (add-after 'unpack 'delete-include-files
1756 (lambda _
1757 (substitute* "src/Makefile.in"
1758 (("^SUBDIRS = misc maths frontend spicelib include/ngspice")
1759 "SUBDIRS = misc maths frontend spicelib"))
1760 #t))
1761 (add-after 'install 'delete-cmpp-dlmain
1762 (lambda* (#:key outputs #:allow-other-keys)
1763 (for-each (lambda (file)
1764 (delete-file
1765 (string-append (assoc-ref outputs "out")
1766 file)))
1767 '("/bin/cmpp" "/share/ngspice/dlmain.c"))
1768 #t))
1769 (delete 'delete-program-manuals)
1770 (delete 'delete-script-files)))))
1771 (inputs
1772 `(("libngspice" ,libngspice)
1773 ("readline" ,readline)))))
1da02b6a
TF
1774
1775(define trilinos-serial-xyce
1776 ;; Note: This is a Trilinos containing only the packages Xyce needs, so we
1777 ;; keep it private. See
1778 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#248>.
1779 ;; TODO: Remove when we have modular Trilinos packages?
1780 (package
1781 (name "trilinos-serial-xyce")
d73482b4 1782 (version "12.12.1")
1da02b6a
TF
1783 (source
1784 (origin (method url-fetch)
1785 (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
1786 version "-Source.tar.gz"))
1787 (sha256
1788 (base32
d73482b4 1789 "1zgrcksrcbmyy79mbdv0j4j4sh0chpigxk8vcrrwgaxyxwxxhrvw"))))
1da02b6a
TF
1790 (build-system cmake-build-system)
1791 (arguments
1792 `(#:out-of-source? #t
d73482b4
TF
1793 #:phases
1794 (modify-phases %standard-phases
1795 ;; Delete unneeded tribits(build system) directory which makes validate-runpath
1796 ;; phase to fail.
1797 (add-before 'validate-runpath 'delete-tribits
1798 (lambda* (#:key outputs #:allow-other-keys)
1799 (delete-file-recursively
1800 (string-append (assoc-ref outputs "out")
1801 "/lib/cmake/tribits"))
1802 #t)))
1da02b6a
TF
1803 #:configure-flags
1804 (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
1805 "-DCMAKE_C_FLAGS=-O3 -fPIC"
1806 "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
1807 "-DTrilinos_ENABLE_NOX=ON"
1808 "-DNOX_ENABLE_LOCA=ON"
1809 "-DTrilinos_ENABLE_EpetraExt=ON"
1810 "-DEpetraExt_BUILD_BTF=ON"
1811 "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
1812 "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
1813 "-DTrilinos_ENABLE_TrilinosCouplings=ON"
1814 "-DTrilinos_ENABLE_Ifpack=ON"
1815 "-DTrilinos_ENABLE_Isorropia=ON"
1816 "-DTrilinos_ENABLE_AztecOO=ON"
1817 "-DTrilinos_ENABLE_Belos=ON"
1818 "-DTrilinos_ENABLE_Teuchos=ON"
1819 "-DTeuchos_ENABLE_COMPLEX=ON"
1820 "-DTrilinos_ENABLE_Amesos=ON"
1821 "-DAmesos_ENABLE_KLU=ON"
1822 "-DAmesos_ENABLE_UMFPACK=ON"
1823 "-DTrilinos_ENABLE_Sacado=ON"
1824 "-DTrilinos_ENABLE_Kokkos=OFF"
1825 "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
1826 "-DTPL_ENABLE_AMD=ON"
1827 "-DTPL_ENABLE_UMFPACK=ON"
1828 "-DTPL_ENABLE_BLAS=ON"
1829 "-DTPL_ENABLE_LAPACK=ON")))
1830 (native-inputs
1831 `(("fortran" ,gfortran)
1832 ("swig" ,swig)))
1833 (inputs
1834 `(("boost" ,boost)
d73482b4 1835 ("lapack" ,lapack)
1da02b6a
TF
1836 ("suitesparse" ,suitesparse)))
1837 (home-page "https://trilinos.org")
1838 (synopsis "Engineering and scientific problems algorithms")
1839 (description
1840 "The Trilinos Project is an effort to develop algorithms and enabling
1841technologies within an object-oriented software framework for the solution of
1842large-scale, complex multi-physics engineering and scientific problems. A
1843unique design feature of Trilinos is its focus on packages.")
1844 (license (list license:lgpl2.1+
1845 license:bsd-3))))
1846
1847(define-public xyce-serial
1848 (package
1849 (name "xyce-serial")
ac04601a 1850 (version "6.8")
1da02b6a
TF
1851 (source
1852 (origin (method url-fetch)
1853 (uri (string-append "https://archive.org/download/Xyce-"
1854 version "/Xyce-" version ".tar.gz"))
1855 (sha256
1856 (base32
ac04601a 1857 "09flp1xywbb2laayd9rg8vd0fjsh115y6k1p71jacy0nrbdvvlcg"))))
1da02b6a
TF
1858 (build-system gnu-build-system)
1859 (arguments
1860 `(#:tests? #f
1861 #:configure-flags
1862 (list
0fe041bd 1863 "CXXFLAGS=-O3"
1da02b6a
TF
1864 (string-append "ARCHDIR="
1865 (assoc-ref %build-inputs "trilinos")))))
1866 (native-inputs
8d564b8b 1867 `(("bison" ,bison-3.0) ;'configure' fails with Bison 3.4
1da02b6a
TF
1868 ("flex" ,flex)
1869 ("fortran" ,gfortran)))
1870 (inputs
1871 `(("fftw" ,fftw)
1872 ("suitesparse" ,suitesparse)
ac04601a 1873 ("lapack" ,lapack)
1da02b6a
TF
1874 ("trilinos" ,trilinos-serial-xyce)))
1875 (home-page "https://xyce.sandia.gov/")
1876 (synopsis "High-performance analog circuit simulator")
1877 (description
1878 "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
1879capable of solving extremely large circuit problems by supporting large-scale
1880parallel computing platforms. It also supports serial execution.")
1881 (license license:gpl3+)))
91cabd3e
TF
1882
1883(define trilinos-parallel-xyce
1884 (package (inherit trilinos-serial-xyce)
1885 (name "trilinos-parallel-xyce")
1886 (arguments
1887 `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
1888 ((#:configure-flags flags)
1889 `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
1890 "-DTrilinos_ENABLE_Zoltan=ON"
1891 "-DTPL_ENABLE_MPI=ON")
1892 ,flags)))))
1893 (inputs
1894 `(("mpi" ,openmpi)
1895 ,@(package-inputs trilinos-serial-xyce)))))
1896
1897(define-public xyce-parallel
1898 (package (inherit xyce-serial)
1899 (name "xyce-parallel")
1900 (arguments
1901 `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
1902 ((#:configure-flags flags)
0fe041bd 1903 `(list "CXXFLAGS=-O3"
91cabd3e
TF
1904 "CXX=mpiCC"
1905 "CC=mpicc"
1906 "F77=mpif77"
1907 "--enable-mpi"
91cabd3e
TF
1908 (string-append
1909 "ARCHDIR="
1910 (assoc-ref %build-inputs "trilinos")))))))
1911 (propagated-inputs
1912 `(("mpi" ,openmpi)))
1913 (inputs
1914 `(("trilinos" ,trilinos-parallel-xyce)
1915 ,@(alist-delete "trilinos"
1916 (package-inputs xyce-serial))))))
f26af33a
TF
1917
1918(define-public freehdl
1919 (package
1920 (name "freehdl")
1921 (version "0.0.8")
1922 (source (origin
1923 (method url-fetch)
1924 (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
1925 version ".tar.gz"))
1926 (sha256
1927 (base32
1a044e39
MB
1928 "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))
1929 (patches
1930 (list (origin
1931 ;; Fix build with GCC 7. Patch taken from Arch Linux:
1932 ;; https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/freehdl
1933 (method url-fetch)
1934 (uri "https://git.archlinux.org/svntogit/community.git\
1935/plain/trunk/build-fix.patch?h=packages/freehdl\
1936&id=3bb90d64dfe6883e26083cd1fa96226d0d59175a")
1937 (file-name "freehdl-c++-namespace.patch")
1938 (sha256
1939 (base32
1940 "09df3c70rx81rnhlhry1wpdhji274nx9jb74rfprk06l4739zm08")))))))
f26af33a
TF
1941 (build-system gnu-build-system)
1942 (arguments
1943 `(#:phases
1944 (modify-phases %standard-phases
1945 (add-before 'configure 'patch-pkg-config
1946 (lambda* (#:key inputs #:allow-other-keys)
1947 (substitute* "freehdl/freehdl-config"
1948 (("pkg-config")
1949 (string-append (assoc-ref inputs "pkg-config")
1950 "/bin/pkg-config"))
1951 (("cat")
1952 (string-append (assoc-ref inputs "coreutils")
1953 "/bin/cat")))
1954 #t))
d3f95898
TF
1955 (add-after 'patch-pkg-config 'setenv
1956 (lambda* (#:key inputs #:allow-other-keys)
1957 (setenv "CXX" (string-append (assoc-ref inputs "gcc")
1958 "/bin/g++"))
1959 (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
1960 "/bin/libtool"))
1961 #t))
1962 (add-after 'setenv 'patch-gvhdl
1963 (lambda _
1964 (substitute* "v2cc/gvhdl.in"
1965 (("--mode=link") "--mode=link --tag=CXX")
1966 (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
1967 #t))
1968 (add-after 'patch-gvhdl 'patch-freehdl-gennodes
1969 (lambda* (#:key inputs #:allow-other-keys)
1970 (substitute* "freehdl/freehdl-gennodes.in"
1971 (("guile")
1972 (string-append (assoc-ref inputs "guile") "/bin/guile"))
1973 (("\\(debug") ";(debug")
1974 (("\\(@ ") "(apply-emit")
1975 (("\\(@@ ") "(apply-mini-format"))
1976 #t))
f26af33a
TF
1977 (add-after 'configure 'patch-freehdl-pc
1978 (lambda* (#:key inputs #:allow-other-keys)
1979 (substitute* "freehdl.pc"
1980 (("=g\\+\\+")
d3f95898 1981 (string-append "=" (assoc-ref inputs "gcc-toolchain")
f26af33a
TF
1982 "/bin/g++"))
1983 (("=libtool")
1984 (string-append "=" (assoc-ref inputs "libtool")
1985 "/bin/libtool")))
1986 #t))
1987 (add-after 'install-scripts 'make-wrapper
d3f95898 1988 (lambda* (#:key inputs outputs #:allow-other-keys)
f26af33a 1989 (let ((out (assoc-ref outputs "out")))
d3f95898
TF
1990 ;; 'gvhdl' invokes the C compiler directly, so hard-code its
1991 ;; file name.
1992 (wrap-program (string-append out "/bin/gvhdl")
1993 `("CPLUS_INCLUDE_PATH" ":" prefix
1994 (,(string-append (assoc-ref inputs "gcc-toolchain")
1995 "/include")))
1996 `("LIBRARY_PATH" ":" prefix
1997 (,(string-append (assoc-ref inputs "gcc-toolchain")
1998 "/lib")))
1999 `("PATH" ":" prefix
2000 (,(string-append (assoc-ref inputs "gcc-toolchain")
2001 "/bin")
2002 ,(string-append (assoc-ref inputs "coreutils")
2003 "/bin"))))
f26af33a
TF
2004 (wrap-program (string-append out "/bin/freehdl-config")
2005 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
2006 #t)))))
2007 (inputs
2008 `(("coreutils" ,coreutils)
40a99ca0 2009 ("gcc-toolchain" ,gcc-toolchain)
d3f95898 2010 ("guile" ,guile-2.2)
f26af33a
TF
2011 ("perl" ,perl)
2012 ("pkg-config" ,pkg-config)
2013 ("libtool" ,libtool)))
2014 (native-inputs
2015 `(("pkg-config-native" ,pkg-config)
2016 ("libtool-native" ,libtool)))
2017 (home-page "http://www.freehdl.seul.org/")
2018 (synopsis "VHDL simulator")
2019 (description
2020 "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
2021 VHDL'93 as well as VHDL'87 standards are supported.")
2022 (license (list license:gpl2+
2023 license:lgpl2.0+)))) ; freehdl's libraries
2024
63b69574
AI
2025(define-public librepcb
2026 (package
2027 (name "librepcb")
9e8f73c4 2028 (version "0.1.4")
63b69574
AI
2029 (source
2030 (origin
2031 (method url-fetch)
9be92490
AI
2032 (uri (string-append "https://download.librepcb.org/releases/"
2033 version "/librepcb-" version "-source.zip"))
63b69574 2034 (sha256
9e8f73c4 2035 (base32 "1b5dkanz3q0y5ag80w0l85hn7axrachb5m9zvyv4zvzrfy09wa88"))))
63b69574
AI
2036 (build-system gnu-build-system)
2037 (inputs
2038 `(("qtbase" ,qtbase)
9e8f73c4 2039 ("qtsvg" ,qtsvg)
63b69574
AI
2040 ("zlib" ,zlib)))
2041 (native-inputs
542d64fd 2042 `(("qttools" ,qttools) ; for lrelease
63b69574
AI
2043 ("unzip" ,unzip)))
2044 (arguments
2045 `(#:phases
2046 (modify-phases %standard-phases
2047 (replace 'configure
2048 (lambda* (#:key inputs outputs #:allow-other-keys)
2049 (mkdir-p "build")
2050 (chdir "build")
2051 (let ((lrelease (string-append (assoc-ref inputs "qttools")
2052 "/bin/lrelease"))
2053 (out (assoc-ref outputs "out")))
2054 (invoke "qmake"
2055 (string-append "QMAKE_LRELEASE=" lrelease)
2056 (string-append "PREFIX=" out)
2057 "../librepcb.pro")))))))
2058 (home-page "https://librepcb.org/")
2059 (synopsis "Electronic Design Automation tool")
2060 (description "LibrePCB is @dfn{Electronic Design Automation} (EDA)
2061software to develop printed circuit boards. It features human readable file
2062formats and complete project management with library, schematic and board
2063editors.")
2064 (license (list license:gpl3+
2065 license:boost1.0 ; libs/clipper,
2066 ; libs/optional/tests/catch.hpp,
2067 ; libs/sexpresso/tests/catch.hpp
2068 license:expat ; libs/delaunay-triangulation,
2069 ; libs/parseagle, libs/type_safe
2070 license:asl2.0 ; libs/fontobene, libs/googletest,
2071 ; libs/parseagle
2072 license:isc ; libs/hoedown
2073 license:cc0 ; libs/optional, libs/sexpresso
2074 license:bsd-2 ; libs/optional/tests/catch.hpp
2075 license:lgpl2.1+)))) ; libs/quazip
6f8ade6e
TS
2076
2077(define-public gpx
2078 (package
2079 (name "gpx")
2080 (version "2.5.2")
2081 (source (origin
2082 (method git-fetch)
2083 (uri (git-reference
b0e7b699 2084 (url "https://github.com/markwal/GPX")
6f8ade6e 2085 (commit version)))
f1d4d79f 2086 (file-name (git-file-name name version))
6f8ade6e
TS
2087 (sha256
2088 (base32
2089 "1yab269x8qyf7rd04vaxyqyjv4pzz9lp4sc4dwh927k23avr3rw5"))))
2090 (build-system gnu-build-system)
2091 (home-page "https://github.com/markwal/GPX")
2092 (synopsis "Converting gcode to x3g files for 3D printing")
2093 (description
2094 "GPX is a post processing utility for converting gcode output from 3D
2095slicing software to x3g files for standalone 3D printing on common 3D
2096printers.")
2097 (license license:gpl2+)))
356b32b9
AI
2098
2099(define-public gnucap
2100 (package
2101 (name "gnucap")
2102 (version "20171003")
2103 (source
2104 (origin
2105 (method url-fetch)
2106 (uri (string-append "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-"
2107 version ".tar.gz"))
2108 (sha256
2109 (base32
2110 "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g"))))
2111 (build-system gnu-build-system)
2112 (inputs
2113 `(("readline" ,readline)))
2114 (arguments
2115 `(#:phases
2116 (modify-phases %standard-phases
2117 (replace 'configure
2118 (lambda* (#:key outputs #:allow-other-keys)
2119 (let ((out (assoc-ref outputs "out")))
2120 ;; Set correct rpath so that gnucap finds libgnucap.so.
2121 (substitute* (list "apps/configure" "lib/configure"
2122 "main/configure" "modelgen/configure")
2123 (("LDFLAGS =")
2124 (string-append "LDFLAGS = -Wl,-rpath=" out "/lib")))
2125 ;; gnucap uses a hand-written configure script that expects the
2126 ;; --prefix argument to be the first argument passed to it.
2127 (invoke "./configure" (string-append "--prefix=" out)))))
2128 (replace 'check
2129 (lambda* (#:key outputs #:allow-other-keys)
2130 (let ((out (assoc-ref outputs "out"))
2131 (libpath "../lib/O:../apps/O"))
2132 (with-directory-excursion "tests"
2133 ;; Make test return non-zero exit code when a test fails.
2134 (substitute* "test"
2135 (("/bin/sh") "/bin/sh -e")
2136 (("\\|\\| echo \"\\*\\*\\*\\* \\$ii fails \\*\\*\\*\\*\"") ""))
2137 ;; Fix expected plugin search path for test c_attach.1.gc
2138 (substitute* "==out/c_attach.1.gc.out"
2139 (("/usr/local/lib/gnucap")
2140 (string-append libpath ":" out "/lib/gnucap")))
2141 ;; Set library path so that gnucap can find libgnucap.so
2142 ;; while running the tests.
2143 (setenv "LD_LIBRARY_PATH" libpath)
2144 (invoke "./test" "../main/O/gnucap" "" "test-output" "==out"))))))))
2145 (home-page "https://www.gnu.org/software/gnucap/")
2146 (synopsis "Mixed analog and digital circuit simulator")
2147 (description "GNUcap is a circuit analysis package. It offers a general
2148purpose circuit simulator and can perform DC and transient analyses, fourier
2149analysis and AC analysis. The engine is designed to do true mixed-mode
2150simulation.")
2151 (license license:gpl3+)))
5cded306 2152
e56186df
LLB
2153(define-public radare2-for-cutter
2154 (package
2155 (inherit radare2)
2156 (name "radare2")
2157 (version "5.0.0")
2158 (source (origin
2159 (method git-fetch)
2160 (uri (git-reference
2161 (url "https://github.com/radareorg/radare2")
2162 (commit version)))
2163 (sha256
2164 (base32
2165 "0aa7c27kd0l55fy5qfvxqmakp4pz6240v3hn84095qmqkzcbs420"))
2166 (file-name (git-file-name name version))))))
2167
5cded306
JL
2168(define-public cutter
2169 (package
2170 (name "cutter")
664ab4ad 2171 (version "1.12.0")
5cded306
JL
2172 (source
2173 (origin
2174 (method git-fetch)
2175 (uri (git-reference
2176 (url "https://github.com/radareorg/cutter")
2177 (commit (string-append "v" version))))
2178 (file-name (git-file-name name version))
2179 (sha256
664ab4ad 2180 (base32 "0ljj3j3apbbw628n2nyrxpbnclixx20bqjxm0xwggqzz9vywsar0"))))
5cded306
JL
2181 (build-system gnu-build-system)
2182 (arguments
2183 `(#:phases
2184 (modify-phases %standard-phases
2185 (replace 'configure
2186 (lambda* (#:key inputs outputs #:allow-other-keys)
2187 (let ((out (assoc-ref outputs "out"))
2188 (radare2 (assoc-ref inputs "radare2")))
ebe9d865
TGR
2189 ;; Fix pkg-config detection ./src/lib_radare2.pri:PREFIX=/usr/lib
2190 ;; override `qmake PREFIX=`.
5cded306
JL
2191 (substitute* "./src/lib_radare2.pri"
2192 (("PREFIX") "R2PREFIX")
2193 (("R2PREFIX=/usr") (string-append "R2PREFIX=" radare2)))
2194 (invoke "qmake"
2195 (string-append "PREFIX=" out)
2196 "./src/Cutter.pro")))))))
2197 (native-inputs
2198 `(("pkg-config" ,pkg-config)))
2199 (inputs
2200 `(("qtbase" ,qtbase)
2201 ("qtsvg" ,qtsvg)
2202 ("openssl" ,openssl)
e56186df
LLB
2203 ;; Depends on radare2 4.5.1 officially, builds and works fine with
2204 ;; radare2 5.0.0 but fails to build with radare2 5.1.1.
2205 ("radare2" ,radare2-for-cutter)))
5cded306
JL
2206 (home-page "https://github.com/radareorg/cutter")
2207 (synopsis "GUI for radare2 reverse engineering framework")
2208 (description "Cutter is a GUI for radare2 reverse engineering framework.
2209Its goal is making an advanced andcustomizable reverse-engineering platform
2210while keeping the user experience at mind. Cutter is created by reverse
2211engineers for reverse engineers.")
2212 (license (list license:cc-by-sa3.0 ;the "Iconic" icon set
2213 license:gpl3+)))) ;everything else
2c0040ae
SS
2214
2215(define-public lib3mf
2216 (package
2217 (name "lib3mf")
b610e4b9 2218 (version "2.1.1")
2c0040ae
SS
2219 (source
2220 (origin
2221 (method git-fetch)
b0e7b699 2222 (uri (git-reference (url "https://github.com/3MFConsortium/lib3mf")
2c0040ae
SS
2223 (commit (string-append "v" version))))
2224 (file-name (git-file-name name version))
2225 (sha256
2226 (base32
b610e4b9 2227 "1417xlxc1y5jnipixhbjfrrjgkrprbbraj8647sff9051m3hpxc3"))))
2c0040ae 2228 (build-system cmake-build-system)
b610e4b9
LLB
2229 (arguments
2230 `(#:configure-flags (list "-DUSE_INCLUDED_ZLIB=0"
2231 "-DUSE_INCLUDED_LIBZIP=0"
2232 "-DUSE_INCLUDED_GTEST=0"
2233 "-DUSE_INCLUDED_SSL=0")))
2c0040ae 2234 (native-inputs
b610e4b9
LLB
2235 `(("googletest" ,googletest)
2236 ("pkg-config" ,pkg-config)))
2c0040ae 2237 (inputs
b610e4b9
LLB
2238 `(("libuuid" ,util-linux "lib")
2239 ("libzip" ,libzip)
2240 ("libressl" ,libressl)
2241 ("zlib" ,zlib)))
2c0040ae
SS
2242 (synopsis "Implementation of the 3D Manufacturing Format (3MF) file standard")
2243 (description
2244 "Lib3MF is a C++ implementation of the 3D Manufacturing Format (3MF) file
2245standard. It offers a way to integrate 3MF reading and writing capabilities, as
2246well as conversion and validation tools for input and output data. The
2247specification can be downloaded at @url{http://3mf.io/specification/}.")
2248 (home-page "https://3mf.io/")
2249 (license license:bsd-2)))
2316ce51
SS
2250
2251(define-public openscad
2252 (package
2253 (name "openscad")
3505d865 2254 (version "2021.01")
2316ce51
SS
2255 (source
2256 (origin
2257 (method url-fetch)
2258 (uri (string-append "https://files.openscad.org/openscad-" version
2259 ".src.tar.gz"))
2260 (sha256
2261 (base32
3505d865 2262 "0n83szr88h8snccjrslr96mgw3f65x3sq726n6x5vxp5wybw4f6r"))))
2316ce51
SS
2263 (build-system cmake-build-system)
2264 (inputs
2265 `(("boost" ,boost)
2266 ("cgal" ,cgal)
2267 ("double-conversion" ,double-conversion)
2268 ("eigen" ,eigen)
2269 ("fontconfig" ,fontconfig)
2270 ("glew" ,glew)
2271 ("gmp" ,gmp)
2272 ("harfbuzz" ,harfbuzz)
2273 ("lib3mf" ,lib3mf)
2274 ("libxml2" ,libxml2)
2275 ("libzip" ,libzip)
2276 ("mpfr" ,mpfr)
2277 ("opencsg" ,opencsg)
2278 ("qscintilla" ,qscintilla)
2279 ("qtbase" ,qtbase)
2280 ("qtmultimedia" ,qtmultimedia)))
2281 (native-inputs
2282 `(("bison" ,bison)
2283 ("flex" ,flex)
2284 ("gettext" ,gettext-minimal)
2285 ("pkg-config" ,pkg-config)
2286 ("which" ,which)
2287 ;; the following are only needed for tests
2288 ("imagemagick" ,imagemagick)
2289 ("ps" ,procps)
2290 ("python" ,python)
ff337525 2291 ("xvfb" ,xorg-server-for-tests)))
2316ce51
SS
2292 (arguments
2293 `(#:phases
2294 (modify-phases %standard-phases
2295 (replace 'configure
2296 (lambda* (#:key outputs #:allow-other-keys)
2297 (invoke "qmake"
2298 (string-append "PREFIX=" (assoc-ref outputs "out")))
2299 #t))
2300 (replace 'check
2301 (lambda _
2302 (with-directory-excursion "tests"
2303 (invoke "cmake" ".")
2304 (invoke "make")
3505d865
LLB
2305 (invoke "ctest" "--exclude-regex"
2306 (string-join
2307 (list
2308 "astdumptest_allexpressions"
2309 "echotest_function-literal-compare"
2310 "echotest_function-literal-tests"
2311 "echotest_allexpressions"
2312 "lazyunion-*"
2313 "pdfexporttest_centered"
04d780b5
LLB
2314 "pdfexporttest_simple-pdf"
2315
2316 ;; Broken due since cgal@5.2 +
2317 ;; https://github.com/CGAL/cgal/pull/5371 (security)
2318 ;; FIXME: Investigate or wait for future releases to
2319 ;; fix it.
2320 ;; Unsure if wrong test-suite or wrong security
2321 ;; patch.
2322 "cgalpngtest_nef3_broken"
2323 "opencsgtest_nef3_broken"
2324 "csgpngtest_nef3_broken"
2325 "throwntogethertest_nef3_broken")
3505d865 2326 "|")))
2316ce51
SS
2327 ;; strip python test files since lib dir ends up in out/share
2328 (for-each delete-file
2329 (find-files "libraries/MCAD" ".*\\.py"))
2330 #t)))))
2331 (synopsis "Script-based 3D modeling application")
2332 (description
2333 "OpenSCAD is a 3D Computer-aided Design (CAD) application. Unlike an
2334interactive modeler, OpenSCAD generates 3D models from a script, giving you
2335full programmatic control over your models.")
2336 (home-page "https://www.openscad.org/")
2337 (license license:gpl2+)))
2895a87f 2338
dcb59439
MS
2339(define-public emacs-scad-mode
2340 (package
2341 (inherit openscad)
2342 (name "emacs-scad-mode")
2343 (native-inputs '())
2344 (inputs '())
2345 (build-system emacs-build-system)
2346 (arguments
2347 `(#:phases
2348 (modify-phases %standard-phases
2349 (add-after 'unpack 'chdir-elisp
2350 ;; Elisp directory is not in root of the source.
2351 (lambda _
2352 (chdir "contrib")
2353 #t)))))
2354 (synopsis "Emacs major mode for editing editing OpenSCAD code")
2355 (description "@code{scad-mode} provides an Emacs major mode for editing
2356OpenSCAD code. It supports syntax highlighting, indenting and refilling of
2357comments.")))
2358
4cd9de60 2359(define-public freecad
ce2fe8bf
EZ
2360 (package
2361 (name "freecad")
2362 (version "0.19.1")
2363 (source
2364 (origin
2365 (method git-fetch)
2366 (uri (git-reference
2367 (url "https://github.com/FreeCAD/FreeCAD")
2368 (commit version)))
2369 (file-name (git-file-name name version))
2370 (sha256
2371 (base32
2372 "0c53q2iawy4yfp11czyc7lbr9ivp3r7v24x4c20myh11wyplffc0"))))
2373 (build-system qt-build-system)
2374 (native-inputs
2375 `(("doxygen" ,doxygen)
2376 ("graphviz" ,graphviz)
2377 ("qttools" ,qttools)
2378 ("pkg-config" ,pkg-config)
2379 ("python-pyside-2-tools" ,python-pyside-2-tools)
2380 ("swig" ,swig)))
2381 (inputs
2382 `(("boost" ,boost)
2383 ("coin3D" ,coin3D)
2384 ("double-conversion" ,double-conversion)
2385 ("eigen" ,eigen)
2386 ("freetype" ,freetype)
2387 ("gl2ps" ,gl2ps)
2388 ("glew" ,glew)
2389 ("hdf5" ,hdf5-1.10)
2390 ("jsoncpp" ,jsoncpp)
2391 ("libarea" ,libarea)
2392 ("libjpeg-turbo" ,libjpeg-turbo)
2393 ("libmedfile" ,libmedfile)
2394 ("libspnav" ,libspnav)
2395 ("libtheora" ,libtheora)
2396 ("libtiff" ,libtiff)
2397 ("libxi" ,libxi)
2398 ("libxmlplusplus" ,libxmlplusplus)
2399 ("libxmu" ,libxmu)
2400 ("lz4" ,lz4)
2401 ("netcdf" ,netcdf)
2402 ("opencascade-occt" ,opencascade-occt)
2403 ("openmpi" ,openmpi)
2404 ("proj" ,proj)
2405 ("python-gitpython" ,python-gitpython)
2406 ("python-matplotlib" ,python-matplotlib)
2407 ("python-pivy" ,python-pivy)
2408 ("python-pyside-2" ,python-pyside-2)
2409 ("python-pyyaml" ,python-pyyaml)
2410 ("python-shiboken-2" ,python-shiboken-2)
2411 ("python-wrapper" ,python-wrapper)
2412 ("qtbase" ,qtbase)
2413 ("qtsvg" ,qtsvg)
2414 ("qtwebkit" ,qtwebkit)
2415 ("qtx11extras" ,qtx11extras)
2416 ("qtxmlpatterns" ,qtxmlpatterns)
2417 ("sqlite" ,sqlite)
2418 ("tbb" ,tbb)
2419 ("vtk" ,vtk-8)
2420 ("xerces-c" ,xerces-c)
2421 ("zlib" ,zlib)))
2422 (arguments
2423 `(#:tests? #f ; Project has no tests
2424 #:configure-flags
2425 (list
2426 "-DBUILD_QT5=ON"
2427 "-DBUILD_FLAT_MESH:BOOL=ON"
2428 (string-append "-DCMAKE_INSTALL_LIBDIR=" (assoc-ref %outputs "out") "/lib")
2429 (string-append "-DPYSIDE2UICBINARY="
2430 (assoc-ref %build-inputs "python-pyside-2-tools")
2431 "/bin/uic")
2432 (string-append "-DPYSIDE2RCCBINARY="
2433 (assoc-ref %build-inputs "python-pyside-2-tools")
2434 "/bin/rcc")
2435 "-DPYSIDE_LIBRARY=PySide2::pyside2"
2436 (string-append
2437 "-DPYSIDE_INCLUDE_DIR="
2438 (assoc-ref %build-inputs "python-pyside-2") "/include;"
2439 (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2;"
2440 (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtCore;"
2441 (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtWidgets;"
2442 (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtGui;")
2443 "-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
2444 (string-append "-DSHIBOKEN_INCLUDE_DIR="
2445 (assoc-ref %build-inputs "python-shiboken-2")
2446 "/include/shiboken2"))
2447 #:phases
2448 (modify-phases %standard-phases
2449 (add-before 'configure 'restore-pythonpath
2450 (lambda _
2451 (substitute* "src/Main/MainGui.cpp"
2452 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))))
2453 (add-after 'install 'wrap-pythonpath
2454 (lambda* (#:key outputs #:allow-other-keys)
2455 (let ((out (assoc-ref outputs "out")))
2456 (wrap-program (string-append out "/bin/FreeCAD")
2457 (list "PYTHONPATH"
2458 'prefix (list (getenv "PYTHONPATH"))))))))))
2459 (home-page "https://www.freecadweb.org/")
2460 (synopsis "Your Own 3D Parametric Modeler")
2461 (description
2462 "FreeCAD is a general purpose feature-based, parametric 3D modeler for
4cd9de60
JS
2463CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
2464product design but also fits a wider range of uses in engineering, such as
2465architecture or other engineering specialties. It is 100% Open Source (LGPL2+
2466license) and extremely modular, allowing for very advanced extension and
2467customization.")
ce2fe8bf
EZ
2468 (license
2469 (list
2470 license:lgpl2.1+
2471 license:lgpl2.0+
2472 license:gpl3+
2473 license:bsd-3))))
4cd9de60 2474
704853fb
JS
2475(define-public libmedfile
2476 (package
2477 (name "libmedfile")
2478 (version "4.0.0")
2479 (source
2480 (origin
2481 (method url-fetch)
2482 (uri (string-append
2483 "https://files.salome-platform.org/Salome/other/med-"
2484 version ".tar.gz"))
2485 (sha256
2486 (base32
2487 "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
2488 (build-system cmake-build-system)
2489 (inputs `(("hdf5" ,hdf5-1.10)))
2490 (arguments
2491 `(#:phases
2492 (modify-phases %standard-phases
2493 (add-after 'install 'remove-test-output
2494 (lambda* (#:key outputs #:allow-other-keys)
2495 (let ((out (assoc-ref outputs "out")))
2496 (delete-file-recursively
2497 (string-append out "/bin/testc"))
2498 #t))))))
2499 (home-page "https://www.salome-platform.org")
2500 (synopsis "Library to read and write MED files")
2501 (description
2502 "The purpose of the MED module is to provide a standard for storing and
2503recovering computer data associated to numerical meshes and fields, and to
2504facilitate the exchange between codes and solvers.
2505
2506The persistent data storage is based upon HDF format (like CGNS, a standard
2507developed by Boeing and NASA in the area of Computational Fluid Dynamic).
2508
2509MED also provides structures to hold data on meshes and fields. These
2510structures are exchanged between solvers, hide the communication level (CORBA
2511or MPI), and offer persistence (read/write in .med files).
2512
2513The main benefit of a common exchange format is reduced complexity of code
2514coupling. It also allows sharing such high level functionalities as
2515computation of nodal connectivity of sub-elements (faces and edges),
2516arithmetic operations on fields, entity location functionalities, and
2517interpolation toolkit.")
2518 (license license:gpl3+)))
2519
2003e837
JS
2520(define-public libarea
2521 (let ((revision "1")
2522 (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
2523 (package
2524 (name "libarea")
2525 (version (git-version "0" revision commit))
2526 (source
2527 (origin
2528 (method git-fetch)
b0e7b699 2529 (uri (git-reference (url "https://github.com/Heeks/libarea")
2003e837
JS
2530 (commit commit)))
2531 (file-name (git-file-name name version))
2532 (sha256
2533 (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
2534 (build-system gnu-build-system)
2535 (inputs `(("boost" ,boost)
2536 ("python-wrapper" ,python-wrapper)))
2537 (native-inputs
c085742e 2538 `(("cmake" ,cmake-minimal)))
2003e837
JS
2539 (arguments
2540 `(#:tests? #f
2541 #:phases
2542 (modify-phases %standard-phases
2543 (add-after 'configure 'cmake-configure
2544 (lambda* (#:key inputs outputs #:allow-other-keys)
2545 (let ((out (assoc-ref outputs "out"))
2546 (cmake (assoc-ref inputs "cmake")))
2547 (mkdir-p "build")
2548 (invoke "cmake"
2549 (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
2550 (delete 'configure))))
2551 (home-page "https://github.com/Heeks/libarea")
2552 (synopsis
2553 "Library and python module for pocketing and profiling operations")
2554 (description
2555 "Area is a CAM-related software for pocketing operation.
2556
2557This project provides library and associated python-module to compute pocket
2558operations.")
2559 (license (list
2560 license:bsd-3
2561 license:gpl3+)))))
2562
2895a87f
JS
2563(define-public libspnav
2564 (package
2565 (name "libspnav")
2566 (version "0.2.3")
2567 (source (origin
2568 (method git-fetch)
2569 (uri (git-reference
b0e7b699 2570 (url "https://github.com/FreeSpacenav/libspnav")
2895a87f
JS
2571 (commit (string-append "libspnav-" version))))
2572 (sha256
2573 (base32
2574 "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba"))
2575 (file-name (git-file-name name version))))
2576 (build-system gnu-build-system)
2577 (inputs
2578 `(("libx11" ,libx11)))
2579 (arguments `(#:tests? #f))
2580 (home-page "http://spacenav.sourceforge.net/")
2581 (synopsis
2582 "Library for communicating with spacenavd or 3dxsrv")
2583 (description
2584 "The libspnav library is provided as a replacement of the magellan
2585library. It provides a cleaner, and more orthogonal interface. libspnav
2586supports both the original X11 protocol for communicating with the driver, and
2587the new alternative non-X protocol. Programs that choose to use the X11
2588protocol, are automatically compatible with either the free spacenavd driver
2589or the official 3dxserv, as if they were using the magellan SDK.
2590
2591Also, libspnav provides a magellan API wrapper on top of the new API. So, any
2592applications that were using the magellan library, can switch to libspnav
18a69803 2593without any changes. And programmers that are familiar with the magellan API
2895a87f
JS
2594can continue using it with a free library without the restrictions of the
2595official SDK.")
2596 (license license:bsd-3)))
e3c3fb1d
EZ
2597
2598(define-public openctm
2599 (let ((revision 603))
2600 ;; Previous versions don't compile, they need to link libGL and libGLU.
2601 ;; Fixed in this revision.
2602 (package
2603 (name "openctm")
2604 (version (string-append "1.0.3." (number->string revision)))
2605 (source
2606 (origin
2607 (method svn-fetch)
2608 (uri (svn-reference
2609 (url "https://svn.code.sf.net/p/openctm/code/trunk")
2610 (revision revision)))
2611 (file-name (string-append name "-" version "-checkout"))
2612 (sha256
2613 (base32 "01wb70m48xh5gwhv60a5brv4sxl0i0rh038w32cgnlxn5x86s9f1"))))
2614 (build-system gnu-build-system)
2615 (native-inputs
525fd26d
EZ
2616 `(("pkg-config" ,pkg-config)))
2617 (inputs
e3c3fb1d
EZ
2618 `(("mesa" ,mesa)
2619 ("glu" ,glu)
2620 ("glut" ,freeglut)
525fd26d 2621 ("gtk" ,gtk+-2)))
e3c3fb1d
EZ
2622 (arguments
2623 `(#:tests? #f ;no tests
2624 #:phases
2625 (modify-phases %standard-phases
2626 (replace 'configure
2627 (lambda* (#:key outputs #:allow-other-keys)
2628 (rename-file "Makefile.linux" "Makefile")
2629 (let ((out (assoc-ref outputs "out")))
2630 ;; Create output directories.
2631 (mkdir-p (string-append out "/lib"))
2632 (mkdir-p (string-append out "/include"))
2633 (mkdir-p (string-append out "/bin"))
2634 ;; Fix rpath.
2635 (substitute* "tools/Makefile.linux"
2636 (("-rpath,\\.")
2637 (string-append "-rpath," out "/lib/"))
2638 (("/usr/local")
2639 out))
2640 ;; Set right output.
2641 (substitute* "Makefile"
2642 (("/usr/lib")
2643 (string-append out "/lib"))
2644 (("\\/usr\\/local")
2645 out))
2646 #t))))))
2647 (synopsis "3D triangle mesh format and related tools and libraries")
2648 (description "OpenCTM is a file format, a software library and a tool set
2649for compression of 3D triangle meshes. The geometry is compressed to a
2650fraction of comparable file formats (3DS, STL, COLLADA...), and the format is
2651accessible through a simple API")
2652 (license license:zlib)
2653 (home-page "http://openctm.sourceforge.net/"))))
1c85ecec
EZ
2654
2655(define-public lib3ds
2656 (package
2657 (name "lib3ds")
2658 (version "1.3.0")
2659 (source
2660 (origin
2661 (method url-fetch)
2662 (uri (string-append
2663 "https://storage.googleapis.com/google-code-archive-downloads"
2664 "/v2/code.google.com/lib3ds/lib3ds-" version ".zip"))
2665 (sha256
2666 (base32 "1qr9arfdkjf7q11xhvxwzmhxqz3nhcjkyb8zzfjpz9jm54q0rc7m"))))
2667 (build-system gnu-build-system)
2668 (native-inputs
2669 `(("unzip" ,unzip)))
2670 (home-page "https://code.google.com/archive/p/lib3ds")
2671 (synopsis "3DS format file toolkit")
2672 (description "Lib3ds is a toolkit for handling the 3DS format for 3D
2673model files. Its main goal is to simplify the creation of 3DS import and
2674export filters.")
2675 (license license:lgpl2.1+)))
2c74e870
EZ
2676
2677(define-public meshlab
2678 (package
2679 (name "meshlab")
667e3f49 2680 (version "2020.06")
2c74e870
EZ
2681 (source (origin
2682 (method git-fetch)
2683 (uri (git-reference
2684 (url "https://github.com/cnr-isti-vclab/meshlab")
2685 (commit (string-append "Meshlab-" version))
2686 (recursive? #t)))
2687 (file-name (git-file-name name version))
2688 (sha256
667e3f49 2689 (base32 "1cgx24wxh2ah5pff51rcrk6x8qcdjpkxcdak7s4cfzmxvjlshydd"))))
2c74e870
EZ
2690 (build-system cmake-build-system)
2691 (inputs
2692 `(("qtbase" ,qtbase)
2693 ("qtscript" ,qtscript)
2694 ("qtxmlpatterns" ,qtxmlpatterns)
2695 ("mesa" ,mesa)
2696 ("glu" ,glu)
2697 ("glew" ,glew)
2698 ("muparser" ,muparser)
2699 ("gmp" ,gmp)
2700 ("eigen" ,eigen)
2701 ("libfreenect" ,libfreenect)
2702 ("lib3ds" ,lib3ds)
2703 ("openctm" ,openctm)
2704 ;; FIXME: Compilation fails with system qhull:
2705 ;; https://github.com/cnr-isti-vclab/meshlab/issues/678
2706 ;; ("qhull" ,qhull)
2707 ))
2708 (arguments
2709 `(#:tests? #f ; Has no tests
2710 #:phases
2711 (modify-phases %standard-phases
2712 (add-after 'unpack 'go-to-source-dir
2713 (lambda _ (chdir "src") #t))
2714 (add-after 'install 'move-files
2715 (lambda* (#:key outputs #:allow-other-keys)
2716 (let ((lib (string-append (assoc-ref outputs "out")
2717 "/lib")))
2718 (rename-file
2719 (string-append lib "/meshlab/libmeshlab-common.so")
2720 (string-append lib "/libmeshlab-common.so"))
2721 #t))))))
2722 (synopsis "3D triangular mesh processing and editing software")
2723 (home-page "https://www.meshlab.net/")
2724 (description "MeshLab is a system for the processing and
2725editing of unstructured large 3D triangular meshes. It is aimed to help the
2726processing of the typical not-so-small unstructured models arising in 3D
2727scanning, providing a set of tools for editing, cleaning, healing, inspecting,
2728rendering and converting this kind of meshes. These tools include MeshLab
2729proper, a versatile program with a graphical user interface, and meshlabserver,
2730a program that can perform mesh processing tasks in batch mode, without a
2731GUI.")
2732 (license license:gpl3+)))
512d23c6
W
2733
2734(define-public poke
5e7388e1
LC
2735 (package
2736 (name "poke")
28e09d7f 2737 (version "1.2")
5e7388e1
LC
2738 (source (origin
2739 (method url-fetch)
2740 (uri (string-append "mirror://gnu/poke/poke-" version
2741 ".tar.gz"))
2742 (sha256
2743 (base32
28e09d7f 2744 "0qnz7lc681nxa16rw9n9q4spy9fas6m2adrpb49imh34bgdgh77n"))))
5e7388e1
LC
2745 (build-system gnu-build-system)
2746 ;; The GUI, which we elide, requires tcl and tk.
2747 (native-inputs `(;; Requires bison 3.6+ but we currently only have 3.5.
2748 ;; Bison 3.6 will be available in the next core update.
2749 ("bison-3.6" ,bison-3.6)
2750 ("clisp" ,clisp)
2751 ("dejagnu" ,dejagnu)
2752 ("flex" ,flex)
2753 ("libtool" ,libtool)
2754 ("perl" ,perl)
2755 ("pkg-config" ,pkg-config)
2756 ("python-2" ,python-2)
2757 ("python-3" ,python-3)))
2758 ;; FIXME: Enable NBD support by adding `libnbd' (currently unpackaged).
5e7388e1
LC
2759 (inputs `(("json-c" ,json-c)
2760 ("libgc" ,libgc)
d6544dc7
LC
2761 ("readline" ,readline)
2762 ("libtextstyle" ,libtextstyle)))
5e7388e1
LC
2763 (arguments
2764 ;; To build the GUI, add the `--enable-gui' configure flag.
2765 ;; To enable the "hyperlink server", add the `--enable-hserver' flag.
2766 `(#:configure-flags '("--enable-mi")))
2767 (home-page "http://jemarch.net/poke.html")
2768 (synopsis "Interactive, extensible editor for binary data")
2769 (description "GNU poke is an interactive, extensible editor for binary
512d23c6
W
2770 data. Not limited to editing basic entities such as bits and bytes, it
2771 provides a full-fledged procedural, interactive programming language designed
2772 to describe data structures and to operate on them.")
5e7388e1 2773 (license license:gpl3+)))
b67bff22
AI
2774
2775(define-public pcb2gcode
2776 (package
2777 (name "pcb2gcode")
2778 (version "2.1.0")
2779 (source
2780 (origin
2781 (method git-fetch)
2782 (uri (git-reference
2783 (url "https://github.com/pcb2gcode/pcb2gcode")
2784 (commit (string-append "v" version))
2785 (recursive? #t)))
2786 (file-name (git-file-name name version))
2787 (sha256
2788 (base32
2789 "0nzglcyh6ban27cc73j4l7w7r9k38qivq0jz8iwnci02pfalw4ry"))))
2790 (build-system gnu-build-system)
2791 (inputs
2792 `(("boost" ,boost)
2793 ("geos" ,geos)
2794 ("gerbv" ,gerbv)
2795 ("glibmm" ,glibmm)
2796 ("gtkmm" ,gtkmm-2)
2797 ("librsvg" ,librsvg)))
2798 (native-inputs
2799 `(("autoconf" ,autoconf)
2800 ("automake" ,automake)
2801 ("libtool" ,libtool)
2802 ("pkg-config" ,pkg-config)))
2803 (home-page "https://github.com/pcb2gcode/pcb2gcode")
2804 (synopsis "Generate G-code for milling PCBs")
2805 (description "pcb2gcode is a command-line program for isolation routing
2806and drilling of PCBs. It takes Gerber files as input and outputs G-code files
2807for the milling of PCBs. It also includes an autoleveller for the automatic
2808dynamic calibration of the milling depth.")
2809 (license license:gpl3+)))
cb704852
GH
2810
2811(define-public syscall-intercept
2812 ;; Upstream provides no tag. Also, last version update is 4 years old.
2813 (let ((commit "304404581c57d43478438d175099d20260bae74e")
2814 (revision "0"))
2815 (package
2816 (name "syscall-intercept")
2817 (version (git-version "0.1.0" revision commit))
2818 (source
2819 (origin
2820 (method git-fetch)
2821 (uri
2822 (git-reference
2823 (url "https://github.com/pmem/syscall_intercept/")
2824 (commit commit)))
2825 (file-name (git-file-name name version))
2826 (sha256
2827 (base32 "17sw78xp5wjzv25adpbq3khl8fi0avj7bgpi57q3jnvl3c68xy5z"))))
2828 (native-inputs
2829 `(("perl" ,perl)
2830 ("pkg-config" ,pkg-config)))
2831 (inputs
2832 `(("capstone" ,capstone)))
2833 (build-system cmake-build-system)
2834 (arguments
2835 `(#:build-type "Release"
2836 ;; FIXME: "syscall_format_logging" test fails.
2837 #:tests? #f))
2838 (home-page "https://github.com/pmem/syscall_intercept")
2839 (synopsis "System call intercepting library")
2840 (description
2841 "The system call intercepting library provides a low-level interface
2842for hooking Linux system calls in user space. This is achieved by
2843hot-patching the machine code of the standard C library in the memory of
2844a process.")
2845 (license license:bsd-2))))