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