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