Commit | Line | Data |
---|---|---|
ffb010b5 | 1 | ;;; GNU Guix --- Functional package management for GNU |
e981ca36 | 2 | ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net> |
93094501 | 3 | ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> |
d8a4b932 | 4 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
0de98139 | 5 | ;;; Copyright © 2016 David Thompson <davet@gnu.org> |
d7d5050c | 6 | ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> |
d109b1e8 | 7 | ;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros@foradis.org> |
6febda94 | 8 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
ffb010b5 RW |
9 | ;;; |
10 | ;;; This file is part of GNU Guix. | |
11 | ;;; | |
12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
13 | ;;; under the terms of the GNU General Public License as published by | |
14 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
15 | ;;; your option) any later version. | |
16 | ;;; | |
17 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ;;; GNU General Public License for more details. | |
21 | ;;; | |
22 | ;;; You should have received a copy of the GNU General Public License | |
23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
24 | ||
40fbd52a | 25 | (define-module (gnu packages engineering) |
ffb010b5 RW |
26 | #:use-module (guix packages) |
27 | #:use-module (guix download) | |
93094501 | 28 | #:use-module (guix gexp) |
ffb010b5 | 29 | #:use-module (guix git-download) |
93094501 FB |
30 | #:use-module (guix monads) |
31 | #:use-module (guix store) | |
412726ee | 32 | #:use-module (guix utils) |
ffb010b5 | 33 | #:use-module ((guix licenses) #:prefix license:) |
befc9ff6 | 34 | #:use-module (guix build-system cmake) |
ffb010b5 | 35 | #:use-module (guix build-system gnu) |
f70be011 | 36 | #:use-module (guix build-system python) |
ffb010b5 | 37 | #:use-module (gnu packages) |
4534d85e | 38 | #:use-module (gnu packages algebra) |
95283f3f | 39 | #:use-module (gnu packages autotools) |
5699a3cf | 40 | #:use-module (gnu packages base) |
20500662 | 41 | #:use-module (gnu packages bison) |
ffb010b5 | 42 | #:use-module (gnu packages boost) |
4534d85e | 43 | #:use-module (gnu packages check) |
93094501 | 44 | #:use-module (gnu packages compression) |
befc9ff6 | 45 | #:use-module (gnu packages curl) |
20500662 | 46 | #:use-module (gnu packages flex) |
ffb010b5 | 47 | #:use-module (gnu packages fontutils) |
324b0040 | 48 | #:use-module (gnu packages freedesktop) |
1251c664 | 49 | #:use-module (gnu packages gcc) |
20500662 | 50 | #:use-module (gnu packages gd) |
95283f3f | 51 | #:use-module (gnu packages gettext) |
93094501 | 52 | #:use-module (gnu packages ghostscript) |
20500662 | 53 | #:use-module (gnu packages gl) |
412726ee RW |
54 | #:use-module (gnu packages glib) |
55 | #:use-module (gnu packages gnome) | |
56 | #:use-module (gnu packages gtk) | |
57 | #:use-module (gnu packages guile) | |
4534d85e | 58 | #:use-module (gnu packages image) |
e981ca36 | 59 | #:use-module (gnu packages imagemagick) |
38cf2ba0 | 60 | #:use-module (gnu packages linux) ;FIXME: for pcb |
0de98139 | 61 | #:use-module (gnu packages m4) |
ffb010b5 | 62 | #:use-module (gnu packages maths) |
44669577 | 63 | #:use-module (gnu packages multiprecision) |
a6edcfaf | 64 | #:use-module (gnu packages mpi) |
f37f949d | 65 | #:use-module (gnu packages ncurses) |
412726ee | 66 | #:use-module (gnu packages perl) |
ffb010b5 | 67 | #:use-module (gnu packages pkg-config) |
befc9ff6 | 68 | #:use-module (gnu packages python) |
ffb010b5 | 69 | #:use-module (gnu packages qt) |
5e872d4b | 70 | #:use-module (gnu packages readline) |
befc9ff6 | 71 | #:use-module (gnu packages swig) |
20500662 | 72 | #:use-module (gnu packages tcl) |
befc9ff6 | 73 | #:use-module (gnu packages tls) |
8f9ac901 | 74 | #:use-module (gnu packages tex) |
befc9ff6 | 75 | #:use-module (gnu packages wxwidgets) |
44669577 | 76 | #:use-module (gnu packages xorg)) |
ffb010b5 RW |
77 | |
78 | (define-public librecad | |
79 | (package | |
80 | (name "librecad") | |
6e9d5d5f | 81 | (version "2.1.3") |
ffb010b5 RW |
82 | (source (origin |
83 | (method url-fetch) | |
84 | (uri (string-append | |
85 | "https://github.com/LibreCAD/LibreCAD/archive/" | |
86 | version ".tar.gz")) | |
d8a4b932 | 87 | (file-name (string-append name "-" version ".tar.gz")) |
ffb010b5 RW |
88 | (sha256 |
89 | (base32 | |
6e9d5d5f | 90 | "01nvc1g3si05r5np1pzn62ah9w84p8nxa32wqrjh6gdi17jfvi3l")))) |
ffb010b5 RW |
91 | (build-system gnu-build-system) |
92 | (arguments | |
93 | '(#:phases | |
d694230a EF |
94 | (modify-phases %standard-phases |
95 | (add-after 'unpack 'patch-paths | |
96 | (lambda* (#:key outputs #:allow-other-keys) | |
97 | (let ((out (assoc-ref outputs "out"))) | |
98 | (substitute* "librecad/src/lib/engine/rs_system.cpp" | |
99 | (("/usr/share") (string-append out "/share")))))) | |
100 | (replace 'configure | |
ffb010b5 RW |
101 | (lambda* (#:key inputs #:allow-other-keys) |
102 | (system* "qmake" (string-append "BOOST_DIR=" | |
d694230a EF |
103 | (assoc-ref inputs "boost"))))) |
104 | (replace 'install | |
105 | (lambda* (#:key outputs #:allow-other-keys) | |
f3860753 TGR |
106 | (let* ((out (assoc-ref outputs "out")) |
107 | (bin (string-append out "/bin")) | |
108 | (share (string-append out "/share/librecad"))) | |
109 | (mkdir-p bin) | |
110 | (install-file "unix/librecad" bin) | |
111 | (mkdir-p share) | |
112 | (copy-recursively "unix/resources" share))))))) | |
ffb010b5 RW |
113 | (inputs |
114 | `(("boost" ,boost) | |
115 | ("muparser" ,muparser) | |
116 | ("freetype" ,freetype) | |
9fdda0b2 RW |
117 | ("qtbase" ,qtbase) |
118 | ("qtsvg" ,qtsvg))) | |
ffb010b5 RW |
119 | (native-inputs |
120 | `(("pkg-config" ,pkg-config) | |
121 | ("which" ,which))) | |
122 | (home-page "http://librecad.org/") | |
123 | (synopsis "Computer-aided design (CAD) application") | |
124 | (description | |
125 | "LibreCAD is a 2D Computer-aided design (CAD) application for creating | |
126 | plans and designs.") | |
127 | (license license:gpl2))) | |
412726ee RW |
128 | |
129 | (define-public geda-gaf | |
130 | (package | |
131 | (name "geda-gaf") | |
12356eb8 | 132 | (version "1.9.2") |
412726ee RW |
133 | (source (origin |
134 | (method url-fetch) | |
135 | (uri (string-append | |
12356eb8 | 136 | "http://ftp.geda-project.org/geda-gaf/unstable/v" |
412726ee RW |
137 | (version-major+minor version) "/" |
138 | version "/geda-gaf-" version ".tar.gz")) | |
139 | (sha256 | |
140 | (base32 | |
12356eb8 | 141 | "14mk45pfz11v54q66gafw2l68n1p5ssvvjmdm8ffgc8x1w5ajfrz")))) |
412726ee RW |
142 | (build-system gnu-build-system) |
143 | (arguments | |
144 | '(#:phases | |
2352c97d RW |
145 | (modify-phases %standard-phases |
146 | ;; tests require a writable HOME | |
147 | (add-before 'check 'set-home | |
148 | (lambda _ | |
149 | (setenv "HOME" (getenv "TMPDIR")) | |
150 | #t))) | |
0de98139 DT |
151 | #:configure-flags |
152 | (let ((pcb (assoc-ref %build-inputs "pcb"))) | |
153 | (list (string-append "--with-pcb-datadir=" pcb "/share") | |
154 | (string-append "--with-pcb-lib-path=" | |
155 | pcb "/share/pcb/pcblib-newlib:" | |
156 | pcb "/share/pcb/newlib"))))) | |
412726ee RW |
157 | (inputs |
158 | `(("glib" ,glib) | |
159 | ("gtk" ,gtk+-2) | |
160 | ("guile" ,guile-2.0) | |
161 | ("desktop-file-utils" ,desktop-file-utils) | |
0de98139 DT |
162 | ("shared-mime-info" ,shared-mime-info) |
163 | ("m4" ,m4) | |
164 | ("pcb" ,pcb))) | |
412726ee RW |
165 | (native-inputs |
166 | `(("pkg-config" ,pkg-config) | |
167 | ("perl" ,perl))) ; for tests | |
168 | (home-page "http://geda-project.org/") | |
169 | (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils") | |
170 | (description | |
a124bbd2 | 171 | "Gaf stands for “gschem and friends”. It is a subset of the entire tool |
412726ee RW |
172 | suite grouped together under the gEDA name. gEDA/gaf is a collection of tools |
173 | which currently includes: gschem, a schematic capture program; gnetlist, a | |
174 | netlist generation program; gsymcheck, a syntax checker for schematic symbols; | |
175 | gattrib, a spreadsheet programm that manipulates the properties of symbols of | |
176 | a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a | |
177 | tool to forward annotation from your schematic to layout using PCB; some minor | |
178 | utilities.") | |
179 | (license license:gpl2+))) | |
180 | ||
20500662 RW |
181 | (define-public pcb |
182 | (package | |
183 | (name "pcb") | |
e981ca36 | 184 | (version "4.0.0") |
20500662 RW |
185 | (source (origin |
186 | (method url-fetch) | |
e981ca36 RW |
187 | (uri (string-append "mirror://sourceforge/pcb/pcb/pcb-" version |
188 | "/pcb-" version ".tar.gz")) | |
20500662 RW |
189 | (sha256 |
190 | (base32 | |
e981ca36 | 191 | "1i6sk8g8h9avms142wl07yv20m1cm4c3fq3v6hybrhdxs2n17plf")))) |
20500662 RW |
192 | (build-system gnu-build-system) |
193 | (arguments | |
194 | `(#:phases | |
dc1d3cde KK |
195 | (modify-phases %standard-phases |
196 | (add-after 'unpack 'use-wish8.6 | |
197 | (lambda _ | |
198 | (substitute* "configure" | |
199 | (("wish85") "wish8.6")) | |
200 | #t)) | |
201 | (add-after 'install 'wrap | |
202 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
203 | ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a | |
204 | ;; fix of the mesa package we wrap the pcb executable such that | |
205 | ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH. | |
206 | (let* ((out (assoc-ref outputs "out")) | |
207 | (path (string-append (assoc-ref inputs "udev") "/lib"))) | |
208 | (wrap-program (string-append out "/bin/pcb") | |
209 | `("LD_LIBRARY_PATH" ":" prefix (,path)))) | |
210 | #t)) | |
211 | (add-before 'check 'pre-check | |
212 | (lambda _ | |
213 | (system "Xvfb :1 &") | |
214 | (setenv "DISPLAY" ":1") | |
215 | #t))))) | |
20500662 RW |
216 | (inputs |
217 | `(("dbus" ,dbus) | |
218 | ("mesa" ,mesa) | |
219 | ("udev" ,eudev) ;FIXME: required by mesa | |
220 | ("glu" ,glu) | |
221 | ("gd" ,gd) | |
222 | ("gtk" ,gtk+-2) | |
223 | ("gtkglext" ,gtkglext) | |
224 | ("desktop-file-utils" ,desktop-file-utils) | |
225 | ("shared-mime-info" ,shared-mime-info) | |
226 | ("tk" ,tk))) | |
227 | (native-inputs | |
228 | `(("pkg-config" ,pkg-config) | |
229 | ("intltool" ,intltool) | |
230 | ("bison" ,bison) | |
e981ca36 RW |
231 | ("flex" ,flex) |
232 | ;; For tests | |
233 | ("imagemagick" ,imagemagick) | |
234 | ("gerbv" ,gerbv) | |
235 | ("ghostscript" ,ghostscript) | |
236 | ("xvfb" ,xorg-server))) | |
20500662 RW |
237 | (home-page "http://pcb.geda-project.org/") |
238 | (synopsis "Design printed circuit board layouts") | |
239 | (description | |
240 | "GNU PCB is an interactive tool for editing printed circuit board | |
241 | layouts. It features a rats-nest implementation, schematic/netlist import, | |
242 | and design rule checking. It also includes an autorouter and a trace | |
243 | optimizer; and it can produce photorealistic and design review images.") | |
244 | (license license:gpl2+))) | |
93094501 | 245 | |
49c2665f RW |
246 | (define-public pcb-rnd |
247 | (package (inherit pcb) | |
248 | (name "pcb-rnd") | |
249 | (version "1.1.3") | |
250 | (source (origin | |
251 | (method url-fetch) | |
252 | (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/" | |
253 | "pcb-rnd-" version ".tar.gz")) | |
254 | (sha256 | |
255 | (base32 | |
256 | "0pycynla60b96jkb6fh6f4sx663pqbzjwnixhw5ym8sym2absm09")))) | |
257 | (arguments | |
258 | `(#:tests? #f ; no check target | |
259 | #:phases | |
260 | (modify-phases %standard-phases | |
261 | (add-after 'unpack 'cc-is-gcc | |
262 | (lambda _ (setenv "CC" "gcc") #t)) | |
263 | (replace 'configure | |
264 | ;; The configure script doesn't tolerate most of our configure flags. | |
265 | (lambda* (#:key outputs #:allow-other-keys) | |
266 | (zero? (system* "sh" "configure" | |
267 | (string-append "--prefix=" | |
268 | (assoc-ref outputs "out"))))))))) | |
269 | (home-page "http://repo.hu/projects/pcb-rnd/") | |
270 | (description "PCB RND is a fork of the GNU PCB circuit board editing tool | |
271 | featuring various improvements and bug fixes."))) | |
272 | ||
93094501 FB |
273 | (define-public fastcap |
274 | (package | |
275 | (name "fastcap") | |
276 | (version "2.0-18Sep92") | |
277 | (source (origin | |
95001d4b | 278 | (method url-fetch/tarbomb) |
93094501 FB |
279 | (uri (string-append "http://www.rle.mit.edu/cpg/codes/" |
280 | name "-" version ".tgz")) | |
281 | (sha256 | |
282 | (base32 | |
283 | "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k")) | |
3dac53be FB |
284 | (snippet |
285 | ;; Remove a non-free file. | |
286 | '(delete-file "doc/psfig.sty")) | |
fc1adab1 AK |
287 | (patches (search-patches "fastcap-mulSetup.patch" |
288 | "fastcap-mulGlobal.patch")))) | |
93094501 FB |
289 | (build-system gnu-build-system) |
290 | (native-inputs | |
291 | `(("texlive" ,texlive) | |
fb0b9ff1 | 292 | ("ghostscript" ,ghostscript))) |
93094501 FB |
293 | (arguments |
294 | `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all") | |
295 | #:parallel-build? #f | |
296 | #:tests? #f ;; no tests-suite | |
297 | #:modules ((srfi srfi-1) | |
298 | ,@%gnu-build-system-modules) | |
299 | #:phases | |
300 | (modify-phases %standard-phases | |
301 | (add-after 'build 'make-doc | |
302 | (lambda _ | |
303 | (zero? (system* "make" "CC=gcc" "RM=rm" "SHELL=sh" | |
304 | "manual")))) | |
305 | (add-before 'make-doc 'fix-doc | |
306 | (lambda _ | |
307 | (substitute* "doc/Makefile" (("/bin/rm") (which "rm"))) | |
308 | (substitute* (find-files "doc" "\\.tex") | |
309 | (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}" | |
310 | all file scale) | |
311 | (string-append "\\includegraphics[scale=" scale "]{" | |
1f7ffd6f FB |
312 | file "}")) |
313 | (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}" | |
314 | all file width) | |
315 | (string-append "\\includegraphics[width=" width "]{" | |
316 | file "}")) | |
317 | (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}" | |
318 | all file height) | |
319 | (string-append "\\includegraphics[height=" height "]{" | |
320 | file "}")) | |
321 | (("\\\\psfig\\{figure=([^,]*)\\}" all file) | |
322 | (string-append "\\includegraphics{" file "}"))) | |
323 | (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex") | |
93094501 FB |
324 | (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}" |
325 | all options class) | |
326 | (string-append "\\documentclass[" options "]{" | |
327 | class "}\n" | |
328 | "\\usepackage{graphicx}\n" | |
329 | "\\usepackage{robinspace}")) | |
330 | (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all) | |
331 | (string-append "%" all)) | |
332 | (("\\\\setstretch\\{.*\\}" all) | |
333 | (string-append "%" all))) | |
334 | #t)) | |
335 | (delete 'configure) | |
336 | (add-before 'install 'clean-bin | |
337 | (lambda _ | |
338 | (delete-file (string-append (getcwd) "/bin/README")) | |
339 | #t)) | |
340 | (add-before 'install 'make-pdf | |
341 | (lambda _ | |
342 | (with-directory-excursion "doc" | |
343 | (and | |
344 | (every (lambda (file) | |
345 | (zero? (system* "dvips" file "-o"))) | |
346 | (find-files "." "\\.dvi")) | |
347 | (every (lambda (file) | |
348 | (zero? (system* "ps2pdf" file))) | |
349 | '("mtt.ps" "ug.ps" "tcad.ps")) | |
350 | (zero? (system* "make" "clean")))))) | |
351 | (replace 'install | |
352 | (lambda* (#:key outputs #:allow-other-keys) | |
353 | (let* ((out (assoc-ref outputs "out")) | |
354 | (data (string-append out "/share")) | |
355 | (bin (string-append out "/bin")) | |
356 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
357 | (examples (string-append doc "/examples"))) | |
358 | (with-directory-excursion "bin" | |
96c46210 LC |
359 | (for-each (lambda (f) |
360 | (install-file f bin)) | |
361 | (find-files "." ".*"))) | |
93094501 FB |
362 | (copy-recursively "doc" doc) |
363 | (copy-recursively "examples" examples) | |
364 | #t)))))) | |
365 | (home-page "http://www.rle.mit.edu/cpg/research_codes.htm") | |
366 | (synopsis "Multipole-accelerated capacitance extraction program") | |
367 | (description | |
368 | "Fastcap is a capacitance extraction program based on a | |
369 | multipole-accelerated algorithm.") | |
370 | (license (license:non-copyleft #f "See fastcap.c.")))) | |
23bae7bb FB |
371 | |
372 | (define-public fasthenry | |
373 | (package | |
374 | (name "fasthenry") | |
375 | (version "3.0-12Nov96") | |
376 | (source (origin | |
377 | (method url-fetch) | |
378 | (file-name (string-append name "-" version ".tar.gz")) | |
379 | (uri (string-append | |
380 | "http://www.rle.mit.edu/cpg/codes/" name | |
381 | "-" version ".tar.z")) | |
382 | (sha256 | |
383 | (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi")) | |
fc1adab1 AK |
384 | (patches (search-patches "fasthenry-spAllocate.patch" |
385 | "fasthenry-spBuild.patch" | |
386 | "fasthenry-spUtils.patch" | |
387 | "fasthenry-spSolve.patch" | |
388 | "fasthenry-spFactor.patch")))) | |
23bae7bb FB |
389 | (build-system gnu-build-system) |
390 | (arguments | |
391 | `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all") | |
392 | #:parallel-build? #f | |
393 | #:tests? #f ;; no tests-suite | |
394 | #:modules ((srfi srfi-1) | |
395 | ,@%gnu-build-system-modules) | |
396 | #:phases | |
397 | (modify-phases %standard-phases | |
398 | (delete 'configure) | |
399 | (replace 'install | |
400 | (lambda* (#:key outputs #:allow-other-keys) | |
401 | (let* ((out (assoc-ref outputs "out")) | |
402 | (data (string-append out "/share")) | |
403 | (bin (string-append out "/bin")) | |
404 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
405 | (examples (string-append doc "/examples"))) | |
406 | (with-directory-excursion "bin" | |
96c46210 LC |
407 | (for-each (lambda (f) |
408 | (install-file f bin)) | |
409 | (find-files "." ".*"))) | |
23bae7bb FB |
410 | (copy-recursively "doc" doc) |
411 | (copy-recursively "examples" examples) | |
412 | #t)))))) | |
413 | (home-page "http://www.rle.mit.edu/cpg/research_codes.htm") | |
414 | (synopsis "Multipole-accelerated inductance analysis program") | |
415 | (description | |
416 | "Fasthenry is an inductance extraction program based on a | |
417 | multipole-accelerated algorithm.") | |
418 | (license (license:non-copyleft #f "See induct.c.")))) | |
95283f3f | 419 | |
3d5fd240 RW |
420 | (define-public fritzing |
421 | (package | |
422 | (name "fritzing") | |
423 | (version "0.9.2b") | |
424 | (source (origin | |
425 | (method url-fetch) | |
426 | (uri (string-append "https://github.com/fritzing/" | |
427 | "fritzing-app/archive/" version ".tar.gz")) | |
428 | (file-name (string-append name "-" version ".tar.gz")) | |
429 | (sha256 | |
430 | (base32 | |
431 | "0pvk57z2pxz89pcwwm61lkpvj4w9qxqz8mi0zkpj6pnaljabp7bf")))) | |
432 | (build-system gnu-build-system) | |
433 | (arguments | |
434 | `(#:phases | |
435 | (modify-phases %standard-phases | |
436 | (replace 'configure | |
437 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
438 | (and (zero? (system* "tar" | |
439 | "-xvf" (assoc-ref inputs "fritzing-parts-db") | |
440 | "-C" "parts")) | |
441 | (zero? (system* "qmake" | |
442 | (string-append "PREFIX=" | |
443 | (assoc-ref outputs "out")) | |
444 | "phoenix.pro")))))))) | |
445 | (inputs | |
a2b99351 DC |
446 | `(("qtbase" ,qtbase) |
447 | ("qtserialport" ,qtserialport) | |
448 | ("qtsvg" ,qtsvg) | |
3d5fd240 RW |
449 | ("boost" ,boost) |
450 | ("zlib" ,zlib) | |
451 | ("fritzing-parts-db" | |
452 | ,(origin | |
453 | (method url-fetch) | |
454 | (uri (string-append "https://github.com/fritzing/" | |
455 | "fritzing-parts/archive/" version ".tar.gz")) | |
456 | (file-name (string-append "fritzing-parts-" version ".tar.gz")) | |
457 | (sha256 | |
458 | (base32 | |
459 | "0jqr8yjg7177f3pk1fcns584r0qavwpr280nggsi2ff3pwk5wpsz")))))) | |
460 | (home-page "http://fritzing.org") | |
461 | (synopsis "Electronic circuit design") | |
462 | (description | |
463 | "The Fritzing application is @dfn{Electronic Design Automation} (EDA) | |
464 | software with a low entry barrier, suited for the needs of makers and | |
465 | hobbyists. It offers a unique real-life \"breadboard\" view, and a parts | |
466 | library with many commonly used high-level components. Fritzing makes it very | |
467 | easy to communicate about circuits, as well as to turn them into PCB layouts | |
468 | ready for production.") | |
469 | ;; Documentation and parts are released under CC-BY-SA 3.0; source code is | |
470 | ;; released under GPLv3+. | |
471 | (license (list license:gpl3+ license:cc-by-sa3.0)))) | |
472 | ||
95283f3f RW |
473 | (define-public gerbv |
474 | (package | |
475 | (name "gerbv") | |
476 | (version "2.6.1") | |
477 | (source (origin | |
478 | (method url-fetch) | |
479 | (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-" | |
480 | version "/gerbv-" version ".tar.gz")) | |
481 | (sha256 | |
482 | (base32 | |
483 | "0v6ry0mxi5qym4z0y0lpblxsw9dfjpgxs4c4v2ngg7yw4b3a59ks")))) | |
484 | (build-system gnu-build-system) | |
485 | (arguments | |
486 | `(#:phases | |
487 | (modify-phases %standard-phases | |
d10092b8 KK |
488 | (add-after 'unpack 'autoconf |
489 | (lambda _ | |
490 | ;; Build rules contain references to Russian translation, but the | |
491 | ;; needed files are missing; see | |
492 | ;; http://sourceforge.net/p/gerbv/bugs/174/ | |
493 | (delete-file "po/LINGUAS") | |
494 | (substitute* "man/Makefile.am" | |
495 | (("PO_FILES= gerbv.ru.1.in.po") "") | |
496 | (("man_MANS = gerbv.1 gerbv.ru.1") "man_MANS = gerbv.1")) | |
497 | (zero? (system* "autoreconf" "-vfi"))))))) | |
95283f3f RW |
498 | (native-inputs |
499 | `(("autoconf" ,autoconf) | |
500 | ("automake" ,automake) | |
501 | ("libtool" ,libtool) | |
b94a6ca0 | 502 | ("gettext" ,gettext-minimal) |
95283f3f RW |
503 | ("po4a" ,po4a) |
504 | ("pkg-config" ,pkg-config))) | |
505 | (inputs | |
506 | `(("cairo" ,cairo) | |
507 | ("gtk" ,gtk+-2) | |
508 | ("desktop-file-utils" ,desktop-file-utils))) | |
509 | (home-page "http://gerbv.geda-project.org/") | |
510 | (synopsis "Gerber file viewer") | |
511 | (description | |
512 | "Gerbv is a viewer for files in the Gerber format (RS-274X only), which | |
513 | is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets | |
514 | you load several files on top of each other, do measurements on the displayed | |
515 | image, etc. Besides viewing Gerbers, you may also view Excellon drill files | |
516 | as well as pick-place files.") | |
517 | (license license:gpl2+))) | |
4534d85e LC |
518 | |
519 | (define-public ao | |
520 | (let ((commit "0bc2354b8dcd1a82a0fd6647706b126045e52734")) | |
521 | (package | |
522 | (name "ao-cad") ;XXX: really "ao", but it collides with libao | |
523 | (version (string-append "0." (string-take commit 7))) | |
524 | (source (origin | |
525 | (method git-fetch) | |
526 | (uri (git-reference | |
527 | (url "https://github.com/mkeeter/ao") | |
528 | (commit commit))) | |
529 | (sha256 | |
530 | (base32 | |
531 | "0lm7iljklafs8dhlvaab2yhwx4xymrdjrqk9c5xvn59hlvbgl1j5")) | |
532 | (file-name (string-append name "-" version "-checkout")) | |
533 | (modules '((guix build utils))) | |
534 | (snippet | |
535 | ;; Remove bundled libraries: Eigen, glm, and catch. TODO: | |
536 | ;; Unbundle efsw <https://github.com/diegostamigni/efsw>. | |
537 | '(begin | |
538 | (delete-file-recursively "vendor") | |
539 | ||
540 | ;; Use #include <catch.hpp>. | |
541 | (substitute* (find-files "." "\\.[ch]pp$") | |
542 | (("catch/catch\\.hpp") | |
543 | "catch.hpp")))))) | |
544 | (build-system cmake-build-system) | |
545 | (arguments | |
546 | `(;; Have the RUNPATH of libao.so point to $libdir, where libefsw.so | |
547 | ;; lives. | |
548 | #:configure-flags (list (string-append "-DCMAKE_SHARED_LINKER_FLAGS=" | |
549 | "-Wl,-rpath=" | |
550 | (assoc-ref %outputs "out") | |
551 | "/lib")) | |
552 | ||
553 | #:phases | |
554 | (modify-phases %standard-phases | |
555 | (add-before 'build 'add-eigen-to-search-path | |
556 | (lambda* (#:key inputs #:allow-other-keys) | |
557 | ;; Allow things to find our own Eigen and Catch. | |
558 | (let ((eigen (assoc-ref inputs "eigen"))) | |
559 | (setenv "CPLUS_INCLUDE_PATH" | |
560 | (string-append eigen "/include/eigen3:" | |
561 | (getenv "CPLUS_INCLUDE_PATH"))) | |
562 | #t))) | |
563 | (add-after 'install 'install-guile-bindings | |
d7d5050c | 564 | (lambda* (#:key inputs outputs #:allow-other-keys) |
4534d85e LC |
565 | ;; Install the Guile bindings (the build system only installs |
566 | ;; libao.so.) | |
567 | (let* ((out (assoc-ref outputs "out")) | |
568 | (moddir (string-append out "/share/guile/site/2.0"))) | |
569 | (install-file "bind/libao.so" | |
570 | (string-append out "/lib")) | |
571 | ||
572 | ;; Go to the source directory. | |
573 | (with-directory-excursion ,(string-append "../" | |
574 | name "-" version | |
575 | "-checkout") | |
576 | (substitute* "bind/guile/ao/bind.scm" | |
577 | (("\\(define libao \\(dynamic-link .*$") | |
578 | (string-append "(define libao (dynamic-link \"" | |
579 | out "/lib/libao\")) ;"))) | |
580 | ||
581 | (for-each (lambda (file) | |
582 | (install-file file | |
583 | (string-append moddir | |
584 | "/ao"))) | |
585 | (find-files "bind/guile" "\\.scm$")) | |
586 | ||
587 | (substitute* "bin/ao-guile" | |
588 | (("\\(add-to-load-path .*") | |
589 | (string-append "(add-to-load-path \"" moddir "\")"))) | |
590 | ||
591 | (install-file "bin/ao-guile" | |
592 | (string-append out "/bin")) | |
d7d5050c LC |
593 | |
594 | ;; Allow Ao to dlopen the relevant GL libraries. Otherwise | |
595 | ;; it fails with: | |
596 | ;; Couldn't find current GLX or EGL context. | |
597 | (let ((mesa (assoc-ref inputs "mesa"))) | |
598 | (wrap-program (string-append out "/bin/ao-guile") | |
599 | `("LD_LIBRARY_PATH" ":" prefix | |
600 | (,(string-append mesa "/lib"))))) | |
4534d85e LC |
601 | #t))))))) |
602 | (native-inputs | |
603 | `(("pkg-config" ,pkg-config))) | |
604 | (inputs | |
605 | `(("boost" ,boost) | |
606 | ("catch" ,catch-framework) | |
607 | ("libpng" ,libpng) | |
608 | ("glfw" ,glfw) | |
609 | ("libepoxy" ,libepoxy) | |
d7d5050c | 610 | ("mesa" ,mesa) |
4534d85e LC |
611 | ("eigen" ,eigen) |
612 | ("glm" ,glm) | |
613 | ("guile" ,guile-2.0))) | |
614 | (home-page "http://www.mattkeeter.com/projects/ao/") | |
615 | (synopsis "Tool for programmatic computer-aided design") | |
616 | (description | |
617 | "Ao is a tool for programmatic computer-aided design (CAD). In Ao, | |
618 | solid models are defined as Scheme scripts, and there are no opaque function | |
619 | calls into the geometry kernel: everything is visible to the user. Even | |
620 | fundamental, primitive shapes are represented as code in the user-level | |
621 | language.") | |
622 | (license (list license:lgpl2.1+ ;library | |
623 | license:gpl2+))))) ;Guile bindings | |
befc9ff6 TF |
624 | |
625 | ;; We use kicad from a git commit, because support for boost 1.61.0 has been | |
626 | ;; recently added. | |
627 | (define-public kicad | |
628 | (let ((commit "4ee344e150bfaf3a6f3f7bf935fb96ae07c423fa") | |
629 | (revision "1")) | |
630 | (package | |
631 | (name "kicad") | |
632 | (version (string-append "4.0-" revision "." | |
633 | (string-take commit 7))) | |
634 | (source | |
635 | (origin | |
636 | (method git-fetch) | |
637 | (uri (git-reference | |
638 | (url "https://git.launchpad.net/kicad") | |
639 | (commit commit))) | |
640 | (sha256 | |
641 | (base32 "0kf6r92nps0658i9n3p9vp5dzbssmc22lvjv5flyvnlf83l63s4n")) | |
642 | (file-name (string-append name "-" version "-checkout")))) | |
643 | (build-system cmake-build-system) | |
644 | (arguments | |
645 | `(#:out-of-source? #t | |
646 | #:tests? #f ; no tests | |
647 | #:configure-flags | |
648 | (list "-DKICAD_STABLE_VERSION=ON" | |
649 | "-DKICAD_REPO_NAME=stable" | |
650 | ,(string-append "-DKICAD_BUILD_VERSION=4.0-" | |
651 | (string-take commit 7)) | |
652 | "-DCMAKE_BUILD_TYPE=Release" | |
653 | "-DKICAD_SKIP_BOOST=ON"; Use our system's boost library. | |
654 | "-DKICAD_SCRIPTING=ON" | |
655 | "-DKICAD_SCRIPTING_MODULES=ON" | |
656 | "-DKICAD_SCRIPTING_WXPYTHON=ON" | |
657 | ;; Has to be set explicitely, as we don't have the wxPython | |
658 | ;; headers in the wxwidgets store item, but in wxPython. | |
659 | (string-append "-DCMAKE_CXX_FLAGS=-I" | |
660 | (assoc-ref %build-inputs "wxpython") | |
661 | "/include/wx-3.0") | |
662 | "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE" | |
663 | ;; TODO: Enable this when CA certs are working with curl. | |
664 | "-DBUILD_GITHUB_PLUGIN=OFF") | |
665 | #:phases | |
666 | (modify-phases %standard-phases | |
667 | (add-after 'install 'wrap-program | |
668 | ;; Ensure correct Python at runtime. | |
669 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
670 | (let* ((out (assoc-ref outputs "out")) | |
671 | (python (assoc-ref inputs "python")) | |
672 | (file (string-append out "/bin/kicad")) | |
673 | (path (string-append | |
674 | out | |
675 | "/lib/python2.7/site-packages:" | |
676 | (getenv "PYTHONPATH")))) | |
677 | (wrap-program file | |
678 | `("PYTHONPATH" ":" prefix (,path)) | |
679 | `("PATH" ":" prefix | |
680 | (,(string-append python "/bin:"))))) | |
681 | #t))))) | |
682 | (native-inputs | |
683 | `(("boost" ,boost) | |
684 | ("gettext" ,gnu-gettext) | |
685 | ("pkg-config" ,pkg-config) | |
686 | ("swig" ,swig) | |
687 | ("zlib" ,zlib))) | |
688 | (inputs | |
689 | `(("cairo" ,cairo) | |
690 | ("curl" ,curl) | |
691 | ("desktop-file-utils" ,desktop-file-utils) | |
692 | ("glew" ,glew) | |
693 | ("glm" ,glm) | |
694 | ("hicolor-icon-theme" ,hicolor-icon-theme) | |
695 | ("libsm" ,libsm) | |
696 | ("mesa" ,mesa) | |
697 | ("openssl" ,openssl) | |
698 | ("python" ,python-2) | |
699 | ("wxwidgets" ,wxwidgets-gtk2) | |
700 | ("wxpython" ,python2-wxpython))) | |
701 | (home-page "http://kicad-pcb.org/") | |
702 | (synopsis "Electronics Design Automation Suite") | |
703 | (description "Kicad is a program for the formation of printed circuit | |
704 | boards and electrical circuits. The software has a number of programs that | |
705 | perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing | |
706 | electrical diagrams), gerbview (viewing Gerber files) and others.") | |
707 | (license license:gpl3+)))) | |
8f528bd4 TF |
708 | |
709 | (define-public kicad-library | |
710 | (let ((version "4.0.4")) | |
711 | (package | |
712 | (name "kicad-library") | |
713 | (version version) | |
714 | (source (origin | |
715 | (method url-fetch) | |
716 | (uri (string-append | |
717 | "http://downloads.kicad-pcb.org/libraries/kicad-library-" | |
718 | version ".tar.gz")) | |
719 | (sha256 | |
720 | (base32 | |
721 | "1wyda58y39lhxml0xv1ngvddi0nqihx9bnlza46ajzms38ajvh12")))) | |
722 | (build-system cmake-build-system) | |
723 | (arguments | |
724 | `(#:out-of-source? #t | |
725 | #:tests? #f ; no tests | |
726 | #:phases | |
727 | (modify-phases %standard-phases | |
728 | (add-after 'install 'install-footprints ; from footprints tarball | |
729 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
730 | (zero? (system* "tar" "xvf" | |
731 | (assoc-ref inputs "kicad-footprints") | |
732 | "-C" (string-append (assoc-ref outputs "out") | |
733 | "/share/kicad/modules") | |
734 | "--strip-components=1")))) | |
735 | ;; We change the default global footprint file, which is generated if | |
736 | ;; it doesn't exist in user's home directory, from the one using the | |
737 | ;; github plugin, to the one using the KISYSMOD environment path. | |
738 | (add-after 'install-footprints 'use-pretty-footprint-table | |
739 | (lambda* (#:key outputs #:allow-other-keys) | |
740 | (let* ((out (assoc-ref outputs "out")) | |
741 | (template-dir (string-append out "/share/kicad/template")) | |
742 | (fp-lib-table (string-append template-dir "/fp-lib-table"))) | |
743 | (delete-file fp-lib-table) | |
744 | (copy-file (string-append fp-lib-table ".for-pretty") | |
745 | fp-lib-table)) | |
746 | #t))))) | |
747 | (native-search-paths | |
748 | (list (search-path-specification | |
749 | (variable "KISYSMOD") ; footprint path | |
750 | (files '("share/kicad/modules"))) | |
751 | (search-path-specification | |
752 | (variable "KISYS3DMOD") ; 3D model path | |
753 | (files '("share/kicad/modules/packages3d"))))) | |
754 | ;; Kicad distributes footprints in a separate tarball | |
755 | (native-inputs | |
756 | `(("kicad-footprints" | |
757 | ,(origin | |
758 | (method url-fetch) | |
759 | (uri (string-append | |
760 | "http://downloads.kicad-pcb.org/libraries/kicad-footprints-" | |
761 | version ".tar.gz")) | |
762 | (sha256 | |
763 | (base32 | |
764 | "0ya4gg6clz3vp2wrb67xwg0bhwh5q8ag39jjmpcp4zjcqs1f48rb")))))) | |
765 | (home-page "http://kicad-pcb.org/") | |
766 | (synopsis "Libraries for kicad") | |
767 | (description "This package provides Kicad component, footprint and 3D | |
768 | render model libraries.") | |
769 | (license license:lgpl2.0+)))) | |
5f947808 JD |
770 | |
771 | (define-public linsmith | |
772 | (package | |
773 | (name "linsmith") | |
774 | (version "0.99.30") | |
775 | (source (origin | |
776 | (method url-fetch) | |
777 | (uri (string-append | |
778 | "mirror://sourceforge/linsmith/linsmith/linsmith-" | |
779 | version "/linsmith-" version ".tar.gz")) | |
780 | (sha256 | |
781 | (base32 | |
782 | "18qslhr2r45rhpj4v6bjcqx189vs0bflvsj271wr7w8kvh69qwvn")))) | |
783 | (build-system gnu-build-system) | |
784 | (native-inputs | |
785 | `(("pkg-config" ,pkg-config) | |
786 | ("gtk" ,gtk+-2) | |
787 | ("libgnome" ,libgnomeui))) | |
788 | (home-page "http://jcoppens.com/soft/linsmith/index.en.php") | |
789 | (synopsis "Smith Charting program") | |
790 | (description "LinSmith is a Smith Charting program, mainly designed for | |
791 | educational use. As such, there is an emphasis on capabilities that improve | |
792 | the 'showing the effect of'-style of operation.") | |
793 | (license license:gpl2+))) | |
2766f9e8 DM |
794 | |
795 | (define-public volk | |
796 | (package | |
797 | (name "volk") | |
798 | (version "1.3") | |
799 | (source | |
800 | (origin | |
801 | (method url-fetch) | |
802 | (uri (string-append "http://libvolk.org/releases/volk-" | |
803 | version ".tar.gz")) | |
804 | (sha256 | |
805 | (base32 | |
806 | "1bz3ywc6y5wmz3i8p4z2wbzhns8bc0ywdkl9qnxpcvfcscarbdlh")))) | |
807 | (build-system cmake-build-system) | |
808 | (inputs | |
809 | `(("boost" ,boost))) | |
810 | (native-inputs | |
811 | `(("python-2", python-2) | |
812 | ("python2-cheetah" ,python2-cheetah))) | |
813 | (home-page "http://libvolk.org/") | |
814 | (synopsis "Vector-Optimized Library of Kernels") | |
815 | (description | |
816 | "@code{volk} contains procedures with machine-specific optimizations | |
817 | for mathematical functions. It also provides an machine-independent | |
818 | interface to select the best such procedures to use on a given system.") | |
819 | (license license:gpl3+))) | |
f37f949d DM |
820 | |
821 | (define-public minicom | |
822 | (package | |
823 | (name "minicom") | |
824 | (version "2.7.1") | |
825 | (source | |
826 | (origin | |
827 | (method url-fetch) | |
828 | (uri (string-append "https://alioth.debian.org/frs/download.php/" | |
829 | "file/4215/" name "-" version ".tar.gz")) | |
830 | (sha256 | |
831 | (base32 | |
832 | "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk")))) | |
833 | (build-system gnu-build-system) | |
834 | (arguments | |
835 | `(#:configure-flags '("--enable-lock-dir=/var/lock") | |
836 | #:phases | |
837 | (modify-phases %standard-phases | |
838 | (add-after 'unpack 'patch-lock-check | |
839 | (lambda _ | |
840 | (substitute* "configure" | |
841 | (("test -d [$]UUCPLOCK") "true")) | |
842 | #t))))) | |
843 | (inputs | |
844 | `(("ncurses" ,ncurses))) | |
845 | (home-page "https://alioth.debian.org/projects/minicom/") | |
846 | (synopsis "Serial terminal emulator") | |
847 | (description "@code{minicom} is a serial terminal emulator.") | |
848 | (license license:gpl2+))) | |
1251c664 TF |
849 | |
850 | (define-public harminv | |
851 | (package | |
852 | (name "harminv") | |
853 | (version "1.4") | |
854 | (source (origin | |
855 | (method url-fetch) | |
856 | (uri | |
857 | (string-append | |
858 | "http://ab-initio.mit.edu/harminv/harminv-" | |
859 | version ".tar.gz")) | |
860 | (sha256 | |
861 | (base32 | |
862 | "1pmm8d6fx9ahhnk7w12bfa6zx3afbkg4gkvlvgwhpjxbcrvrp3jk")))) | |
863 | (build-system gnu-build-system) | |
864 | (arguments | |
865 | `(#:phases | |
866 | (modify-phases %standard-phases | |
867 | (add-before 'configure 'fix-tests | |
868 | (lambda _ | |
869 | (substitute* "./sines-test.sh" | |
870 | ; change test frequency range - default fails | |
871 | (("0\\.15") "0.16")) | |
872 | #t))))) | |
873 | (native-inputs | |
874 | `(("fortran" ,gfortran))) | |
875 | (inputs | |
876 | `(("lapack" ,lapack))) | |
877 | (home-page "http://ab-initio.mit.edu/wiki/index.php/Harminv") | |
878 | (synopsis "Harmonic inversion solver") | |
879 | (description | |
880 | "Harminv is a free program (and accompanying library) to solve the problem of | |
881 | harmonic inversion — given a discrete-time, finite-length signal that consists of a sum | |
882 | of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it | |
883 | determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.") | |
884 | (license license:gpl2+))) | |
cbd9568f TF |
885 | |
886 | (define-public guile-libctl | |
887 | (package | |
888 | (name "guile-libctl") | |
889 | (version "3.2.2") | |
890 | (source (origin | |
891 | (method url-fetch) | |
892 | (uri | |
893 | (string-append | |
894 | "http://ab-initio.mit.edu/libctl/libctl-" | |
895 | version ".tar.gz")) | |
896 | (sha256 | |
897 | (base32 | |
898 | "1g7gqybq20jhdnw5vg18bgbj9jz0408gfmjvs8b4xs30pic8pgca")))) | |
899 | (build-system gnu-build-system) | |
900 | (native-inputs | |
901 | `(("fortran" ,gfortran))) | |
902 | (inputs | |
903 | `(("guile" ,guile-2.2))) | |
904 | (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl") | |
905 | (synopsis "Flexible control files implementation for scientific simulations") | |
906 | (description | |
907 | "Libctl is a Guile-based library implementing flexible control files | |
908 | for scientific simulations.") | |
909 | (license license:gpl2+))) | |
5e872d4b TF |
910 | |
911 | (define-public mpb | |
912 | (package | |
913 | (name "mpb") | |
914 | (version "1.5") | |
915 | (source (origin | |
916 | (method url-fetch) | |
917 | (uri | |
918 | (string-append | |
919 | "http://ab-initio.mit.edu/mpb/mpb-" | |
920 | version ".tar.gz")) | |
921 | (sha256 | |
922 | (base32 | |
923 | "1mqb2d8jq957nksayjygq58iy8i42vjryzg9iy5fpfay31wzxsix")))) | |
924 | (build-system gnu-build-system) | |
925 | (arguments | |
926 | `(#:configure-flags | |
927 | (list (string-append "--with-libctl=" | |
928 | (assoc-ref %build-inputs "libctl") | |
929 | "/share/libctl")))) | |
930 | (native-inputs | |
931 | `(("fortran" ,gfortran) | |
932 | ("pkg-config" ,pkg-config) | |
933 | ("swig" ,swig))) | |
934 | (inputs | |
935 | `(("fftw" ,fftw) | |
936 | ("gsl" ,gsl) | |
937 | ("guile" ,guile-2.2) | |
938 | ("hdf5" ,hdf5) | |
939 | ("lapack" ,lapack) | |
940 | ("libctl" ,guile-libctl) | |
941 | ("readline" ,readline) | |
942 | ("zlib" ,zlib))) | |
943 | (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands") | |
944 | (synopsis "Computes band structures and electromagnetic modes of dielectric | |
945 | structures") | |
946 | (description | |
947 | "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes) | |
948 | of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using | |
949 | fully-vectorial and three-dimensional methods.") | |
950 | (license license:gpl2+))) | |
28b08d2a TF |
951 | |
952 | (define-public meep | |
953 | (package | |
954 | (name "meep") | |
955 | (version "1.3") | |
956 | (source (origin | |
957 | (method url-fetch) | |
958 | (uri | |
959 | (string-append | |
960 | "http://ab-initio.mit.edu/meep/meep-" | |
961 | version ".tar.gz")) | |
962 | (sha256 | |
963 | (base32 | |
964 | "0f6lbw2hrksg7xscwdqs78jc9nmzx9fs8j0hz1y4i8qknkqiyk2n")))) | |
965 | (build-system gnu-build-system) | |
966 | (arguments | |
967 | `(#:configure-flags | |
968 | (list (string-append "--with-libctl=" | |
969 | (assoc-ref %build-inputs "libctl") | |
970 | "/share/libctl")))) | |
971 | (native-inputs | |
972 | `(("fortran" ,gfortran) | |
973 | ("pkg-config" ,pkg-config) | |
974 | ("swig" ,swig))) | |
975 | (inputs | |
976 | `(("fftw" ,fftw) | |
977 | ("gsl" ,gsl) | |
8bca358b | 978 | ("guile" ,guile-2.0) ; doesn't build with guile-2.2 |
28b08d2a TF |
979 | ("harminv" ,harminv) |
980 | ("hdf5" ,hdf5) | |
981 | ("lapack" ,lapack) | |
982 | ("libctl" ,guile-libctl) | |
983 | ("mpb" ,mpb) | |
984 | ("zlib" ,zlib))) | |
985 | (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep") | |
986 | (synopsis "Finite-difference time-domain (FDTD) simulation software") | |
987 | (description | |
988 | "Meep is a finite-difference time-domain (FDTD) simulation software package | |
989 | developed at MIT to model electromagnetic systems.") | |
990 | (license license:gpl2+))) | |
8bca358b TF |
991 | |
992 | (define-public adms | |
993 | (package | |
994 | (name "adms") | |
995 | (version "2.3.6") | |
996 | (source (origin | |
997 | (method url-fetch) | |
998 | (uri | |
999 | (string-append | |
1000 | "mirror://sourceforge/mot-adms/adms-source/" | |
1001 | (version-major+minor version) "/adms-" version ".tar.gz")) | |
1002 | (sha256 | |
1003 | (base32 | |
1004 | "1rn98l6jxcjhi6ai5f7p588khra9z80m0m0lql4n4sb7773fh1vk")))) | |
1005 | (build-system gnu-build-system) | |
1006 | (native-inputs | |
1007 | `(("flex" ,flex) | |
1008 | ("bison" ,bison))) | |
1009 | (home-page "https://sourceforge.net/projects/mot-adms") | |
1010 | (synopsis "Automatic device model synthesizer") | |
1011 | (description | |
1012 | "ADMS is a code generator that converts electrical compact device models | |
1013 | specified in high-level description language into ready-to-compile C code for | |
1014 | the API of spice simulators. Based on transformations specified in XML | |
1015 | language, ADMS transforms Verilog-AMS code into other target languages.") | |
1016 | (license license:gpl3))) | |
6febda94 JL |
1017 | |
1018 | (define-public capstone | |
1019 | (package | |
1020 | (name "capstone") | |
1021 | (version "3.0.5-rc2") | |
1022 | (source (origin | |
1023 | (method url-fetch) | |
1024 | (uri (string-append "https://github.com/aquynh/capstone/archive/" | |
1025 | version ".tar.gz")) | |
1026 | (file-name (string-append name "-" version ".tar.gz")) | |
1027 | (sha256 | |
1028 | (base32 | |
1029 | "1cqms9r2p43aiwp5spd84zaccp16ih03r7sjhrv16nddahj0jz2q")))) | |
1030 | (build-system gnu-build-system) | |
1031 | (arguments | |
1032 | `(#:tests? #f | |
1033 | #:make-flags (list (string-append "PREFIX=" %output) | |
1034 | "CC=gcc") | |
1035 | #:phases | |
1036 | (modify-phases %standard-phases | |
1037 | (delete 'configure) | |
1038 | ;; cstool's Makefile overrides LDFLAGS, so we cannot pass it as a make flag. | |
1039 | (add-before 'build 'fix-cstool-ldflags | |
1040 | (lambda* (#:key outputs #:allow-other-keys) | |
1041 | (substitute* "cstool/Makefile" | |
1042 | (("LDFLAGS =") | |
1043 | (string-append "LDFLAGS = -Wl,-rpath=" (assoc-ref outputs "out") | |
1044 | "/lib"))) | |
1045 | #t))))) | |
1046 | (home-page "http://www.capstone-engine.org") | |
1047 | (synopsis "Lightweight multi-platform, multi-architecture disassembly framework") | |
1048 | (description | |
1049 | "Capstone is a lightweight multi-platform, multi-architecture disassembly | |
1050 | framework. Capstone can disassemble machine code for many supported architectures | |
1051 | such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and xcore. It provides | |
1052 | bindings for Python, Java, OCaml and more.") | |
1053 | (license license:bsd-3))) | |
f70be011 JL |
1054 | |
1055 | ;; FIXME: This package has a timestamp embedded in | |
1056 | ;; lib/python3.5/site-packages/capstone/__pycache__/__iti__.cpython-35.pyc | |
1057 | (define-public python-capstone | |
1058 | (package | |
1059 | (inherit capstone) | |
1060 | (name "python-capstone") | |
1061 | (propagated-inputs | |
1062 | `(("capstone" ,capstone))) | |
1063 | (build-system python-build-system) | |
1064 | (arguments | |
1065 | `(#:phases | |
1066 | (modify-phases %standard-phases | |
1067 | (add-after 'unpack 'chdir-and-fix-setup-py | |
1068 | (lambda _ | |
1069 | (chdir "bindings/python") | |
1070 | ;; Do not build the library again, because we already have it. | |
1071 | (substitute* "setup.py" ((".* build_libraries.*") "")) | |
1072 | ;; This substitution tells python-capstone where to find the | |
1073 | ;; library. | |
1074 | (substitute* "capstone/__init__.py" | |
1075 | (("pkg_resources.resource_filename.*") | |
1076 | (string-append "'" (assoc-ref %build-inputs "capstone") "/lib',\n"))) | |
1077 | #t))))))) | |
1078 | ||
1079 | (define-public python2-capstone | |
1080 | (package-with-python2 python-capstone)) | |
44669577 JL |
1081 | |
1082 | (define-public radare2 | |
1083 | (package | |
1084 | (name "radare2") | |
1085 | (version "1.6.0") | |
1086 | (source (origin | |
1087 | (method url-fetch) | |
1088 | (uri (string-append "http://radare.mikelloc.com/get/" version "/" | |
1089 | name "-" version ".tar.gz")) | |
1090 | (sha256 | |
1091 | (base32 | |
1092 | "16ggsk40zz6hyvclvqj1r4bh4hb78jf0d6ppry1jk4r0j30wm7cm")) | |
1093 | (modules '((guix build utils))) | |
1094 | (snippet | |
1095 | '(begin | |
1096 | (substitute* "libr/asm/p/Makefile" | |
1097 | (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) ")) | |
1098 | (substitute* "libr/parse/p/Makefile" | |
1099 | (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) ")) | |
1100 | (substitute* "libr/bin/p/Makefile" | |
1101 | (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) ")))))) | |
1102 | (build-system gnu-build-system) | |
1103 | (arguments | |
1104 | '(#:tests? #f; tests require git and network access | |
1105 | #:phases | |
1106 | (modify-phases %standard-phases | |
1107 | (add-before 'configure 'mklibdir | |
1108 | (lambda* (#:key inputs #:allow-other-keys) | |
1109 | (mkdir-p (string-append (assoc-ref %outputs "out") "/lib")) | |
1110 | #t))) | |
1111 | #:configure-flags | |
1112 | (list "--with-sysmagic" "--with-syszip" "--with-openssl" | |
1113 | "--without-nonpic" "--with-rpath" "--with-syscapstone") | |
1114 | #:make-flags | |
1115 | (list "CC=gcc"))) | |
1116 | (inputs | |
1117 | `(("openssl" ,openssl) | |
1118 | ("zip" ,zip) | |
1119 | ("gmp" ,gmp) | |
1120 | ("capstone" ,capstone))) | |
1121 | (native-inputs | |
1122 | `(("pkg-config" ,pkg-config))) | |
1123 | (home-page "https://radare.org/") | |
1124 | (synopsis "Portable reversing framework") | |
1125 | (description | |
1126 | "Radare project started as a forensics tool, a scriptable commandline | |
1127 | hexadecimal editor able to open disk files, but later support for analyzing | |
1128 | binaries, disassembling code, debugging programs, attaching to remote gdb | |
1129 | servers, ...") | |
1130 | (license license:lgpl3))) | |
a6edcfaf TF |
1131 | |
1132 | (define-public asco | |
1133 | (package | |
1134 | (name "asco") | |
1135 | (version "0.4.10") | |
1136 | (source (origin | |
1137 | (method url-fetch) | |
1138 | (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-" | |
1139 | version ".tar.gz")) | |
1140 | (sha256 | |
1141 | (base32 | |
1142 | "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl")))) | |
1143 | (build-system gnu-build-system) | |
1144 | (arguments | |
1145 | `(#:tests? #f ; no tests | |
1146 | #:make-flags '("all" "asco-mpi") | |
1147 | #:phases | |
1148 | (modify-phases %standard-phases | |
1149 | (delete 'configure) | |
1150 | (add-before 'build 'fix-paths | |
1151 | (lambda* (#:key inputs #:allow-other-keys) | |
1152 | (let ((coreutils (assoc-ref inputs "coreutils-minimal"))) | |
1153 | (substitute* '("errfunc.c" "asco.c") | |
1154 | (("cp ") | |
1155 | (string-append coreutils "/bin/cp ")) | |
1156 | (("nice") | |
1157 | (string-append coreutils "/bin/nice"))) | |
1158 | (substitute* "Makefile" | |
1159 | (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc"))) | |
1160 | #t))) | |
1161 | (replace 'install ; no install target | |
1162 | (lambda* (#:key outputs #:allow-other-keys) | |
1163 | (for-each (lambda (file) | |
1164 | (install-file file (string-append | |
1165 | (assoc-ref outputs "out") | |
1166 | "/bin"))) | |
1167 | '("asco" "asco-mpi" "asco-test" | |
1168 | "tools/alter/alter" "tools/log/log")) | |
1169 | #t))))) | |
1170 | (native-inputs | |
1171 | `(("mpi" ,openmpi))) | |
1172 | (inputs | |
1173 | `(("coreutils-minimal" ,coreutils-minimal))) | |
1174 | (home-page "http://asco.sourceforge.net/") | |
1175 | (synopsis "SPICE circuit optimizer") | |
1176 | (description | |
1177 | "ASCO brings circuit optimization capabilities to existing SPICE simulators using a | |
1178 | high-performance parallel differential evolution (DE) optimization algorithm.") | |
1179 | (license license:gpl2+))) | |
710cc1a4 TF |
1180 | |
1181 | (define-public libngspice | |
1182 | ;; Note: The ngspice's build system does not allow us to build both the | |
1183 | ;; library and the executables in one go. Thus, we have two packages. | |
1184 | ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>. | |
1185 | (package | |
1186 | (name "libngspice") | |
1187 | (version "26") | |
1188 | (source (origin | |
1189 | (method url-fetch) | |
1190 | (uri (string-append "mirror://sourceforge/ngspice/ng-spice-rework/" | |
1191 | version "/ngspice-" version ".tar.gz")) | |
1192 | (sha256 | |
1193 | (base32 | |
1194 | "02019ndcl057nq9z41nxycqba7wxlb081ibvfj9jv010nz431qji")) | |
1195 | (modules '((guix build utils))) | |
1196 | ;; We remove the non-free cider and build without it. | |
1197 | (snippet | |
1198 | '(begin | |
1199 | (delete-file-recursively "src/ciderlib") | |
1200 | (delete-file "src/ciderinit") | |
1201 | (substitute* "configure" | |
1202 | (("src/ciderlib/Makefile") "") | |
1203 | (("src/ciderlib/input/Makefile") "") | |
1204 | (("src/ciderlib/support/Makefile") "") | |
1205 | (("src/ciderlib/oned/Makefile") "") | |
1206 | (("src/ciderlib/twod/Makefile") "")))))) | |
1207 | (build-system gnu-build-system) | |
1208 | (arguments | |
1209 | `(;; No tests for libngspice exist. | |
1210 | ;; The transient tests for ngspice fail. | |
1211 | #:tests? #f | |
1212 | #:phases | |
1213 | (modify-phases %standard-phases | |
1214 | (add-after 'unpack 'patch-timestamps | |
1215 | (lambda _ | |
1216 | (substitute* "configure" | |
1217 | (("`date`") "Do 1. Jan 00:00:00 UTC 1970")) | |
1218 | #t)) | |
1219 | (add-after 'unpack 'delete-program-manuals | |
1220 | (lambda _ | |
1221 | (substitute* "man/man1/Makefile.in" | |
1222 | (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1 ngmultidec\\.1") | |
1223 | "man_MANS = ")) | |
1224 | #t)) | |
1225 | (add-after 'install 'delete-script-files | |
1226 | (lambda* (#:key outputs #:allow-other-keys) | |
1227 | (delete-file-recursively | |
1228 | (string-append (assoc-ref outputs "out") | |
1229 | "/share/ngspice/scripts"))))) | |
1230 | #:configure-flags | |
1231 | (list "--enable-openmp" | |
1232 | "--enable-xspice" | |
1233 | "--with-ngshared" | |
1234 | "--with-readline=yes"))) | |
1235 | (native-inputs | |
1236 | `(("bison" ,bison) | |
1237 | ("flex" ,flex))) | |
1238 | (inputs | |
1239 | `(("libxaw" ,libxaw) | |
1240 | ("mpi" ,openmpi) | |
1241 | ("readline" ,readline))) | |
1242 | (home-page "http://ngspice.sourceforge.net/") | |
1243 | (synopsis "Mixed-level/mixed-signal circuit simulator") | |
1244 | (description | |
1245 | "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes | |
1246 | @code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that | |
1247 | provides code modeling support and simulation of digital components through | |
1248 | an embedded event driven algorithm.") | |
1249 | (license (list license:lgpl2.0+ ; code in frontend/numparam | |
1250 | (license:non-copyleft "file:///COPYING") ; spice3 bsd-style | |
1251 | license:public-domain)))) ; xspice | |
1252 | ||
1253 | (define-public ngspice | |
1254 | ;; The ngspice executables (see libngpsice above.) | |
1255 | (package (inherit libngspice) | |
1256 | (name "ngspice") | |
1257 | (arguments | |
1258 | (substitute-keyword-arguments (package-arguments libngspice) | |
1259 | ((#:configure-flags flags) | |
1260 | `(delete "--with-ngshared" ,flags)) | |
1261 | ((#:phases phases) | |
1262 | `(modify-phases ,phases | |
1263 | (add-after 'unpack 'delete-include-files | |
1264 | (lambda _ | |
1265 | (substitute* "src/Makefile.in" | |
1266 | (("^SUBDIRS = misc maths frontend spicelib include/ngspice") | |
1267 | "SUBDIRS = misc maths frontend spicelib")) | |
1268 | #t)) | |
1269 | (add-after 'install 'delete-cmpp-dlmain | |
1270 | (lambda* (#:key outputs #:allow-other-keys) | |
1271 | (for-each (lambda (file) | |
1272 | (delete-file | |
1273 | (string-append (assoc-ref outputs "out") | |
1274 | file))) | |
1275 | '("/bin/cmpp" "/share/ngspice/dlmain.c")) | |
1276 | #t)) | |
1277 | (delete 'delete-program-manuals) | |
1278 | (delete 'delete-script-files))))) | |
1279 | (inputs | |
1280 | `(("libngspice" ,libngspice) | |
1281 | ("readline" ,readline))))) |