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