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