1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
7 ;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages engineering)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix gexp)
28 #:use-module (guix git-download)
29 #:use-module (guix monads)
30 #:use-module (guix store)
31 #:use-module (guix utils)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system cmake)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages algebra)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages curl)
45 #:use-module (gnu packages flex)
46 #:use-module (gnu packages fontutils)
47 #:use-module (gnu packages freedesktop)
48 #:use-module (gnu packages gd)
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages ghostscript)
51 #:use-module (gnu packages gl)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages guile)
56 #:use-module (gnu packages image)
57 #:use-module (gnu packages imagemagick)
58 #:use-module (gnu packages linux) ;FIXME: for pcb
59 #:use-module (gnu packages m4)
60 #:use-module (gnu packages maths)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages qt)
66 #:use-module (gnu packages swig)
67 #:use-module (gnu packages tcl)
68 #:use-module (gnu packages tls)
69 #:use-module (gnu packages tex)
70 #:use-module (gnu packages wxwidgets)
71 #:use-module (gnu packages xorg)
72 #:use-module (srfi srfi-1))
74 (define-public librecad
81 "https://github.com/LibreCAD/LibreCAD/archive/"
83 (file-name (string-append name "-" version ".tar.gz"))
86 "01nvc1g3si05r5np1pzn62ah9w84p8nxa32wqrjh6gdi17jfvi3l"))))
87 (build-system gnu-build-system)
90 (modify-phases %standard-phases
91 (add-after 'unpack 'patch-paths
92 (lambda* (#:key outputs #:allow-other-keys)
93 (let ((out (assoc-ref outputs "out")))
94 (substitute* "librecad/src/lib/engine/rs_system.cpp"
95 (("/usr/share") (string-append out "/share"))))))
97 (lambda* (#:key inputs #:allow-other-keys)
98 (system* "qmake" (string-append "BOOST_DIR="
99 (assoc-ref inputs "boost")))))
101 (lambda* (#:key outputs #:allow-other-keys)
102 (let* ((out (assoc-ref outputs "out"))
103 (bin (string-append out "/bin"))
104 (share (string-append out "/share/librecad")))
106 (install-file "unix/librecad" bin)
108 (copy-recursively "unix/resources" share)))))))
111 ("muparser" ,muparser)
112 ("freetype" ,freetype)
116 `(("pkg-config" ,pkg-config)
118 (home-page "http://librecad.org/")
119 (synopsis "Computer-aided design (CAD) application")
121 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
123 (license license:gpl2)))
125 (define-public geda-gaf
132 "http://ftp.geda-project.org/geda-gaf/unstable/v"
133 (version-major+minor version) "/"
134 version "/geda-gaf-" version ".tar.gz"))
137 "14mk45pfz11v54q66gafw2l68n1p5ssvvjmdm8ffgc8x1w5ajfrz"))))
138 (build-system gnu-build-system)
141 (modify-phases %standard-phases
142 ;; tests require a writable HOME
143 (add-before 'check 'set-home
145 (setenv "HOME" (getenv "TMPDIR"))
148 (let ((pcb (assoc-ref %build-inputs "pcb")))
149 (list (string-append "--with-pcb-datadir=" pcb "/share")
150 (string-append "--with-pcb-lib-path="
151 pcb "/share/pcb/pcblib-newlib:"
152 pcb "/share/pcb/newlib")))))
157 ("desktop-file-utils" ,desktop-file-utils)
158 ("shared-mime-info" ,shared-mime-info)
162 `(("pkg-config" ,pkg-config)
163 ("perl" ,perl))) ; for tests
164 (home-page "http://geda-project.org/")
165 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
167 "Gaf stands for “gschem and friends”. It is a subset of the entire tool
168 suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
169 which currently includes: gschem, a schematic capture program; gnetlist, a
170 netlist generation program; gsymcheck, a syntax checker for schematic symbols;
171 gattrib, a spreadsheet programm that manipulates the properties of symbols of
172 a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
173 tool to forward annotation from your schematic to layout using PCB; some minor
175 (license license:gpl2+)))
183 (uri (string-append "mirror://sourceforge/pcb/pcb/pcb-" version
184 "/pcb-" version ".tar.gz"))
187 "1i6sk8g8h9avms142wl07yv20m1cm4c3fq3v6hybrhdxs2n17plf"))))
188 (build-system gnu-build-system)
194 (substitute* "configure"
195 (("wish85") "wish8.6")))
198 (lambda* (#:key inputs outputs #:allow-other-keys)
199 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
200 ;; fix of the mesa package we wrap the pcb executable such that
201 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
202 (let* ((out (assoc-ref outputs "out"))
203 (path (string-append (assoc-ref inputs "udev") "/lib")))
204 (wrap-program (string-append out "/bin/pcb")
205 `("LD_LIBRARY_PATH" ":" prefix (,path)))))
210 (setenv "DISPLAY" ":1")
212 %standard-phases)))))
216 ("udev" ,eudev) ;FIXME: required by mesa
220 ("gtkglext" ,gtkglext)
221 ("desktop-file-utils" ,desktop-file-utils)
222 ("shared-mime-info" ,shared-mime-info)
225 `(("pkg-config" ,pkg-config)
226 ("intltool" ,intltool)
230 ("imagemagick" ,imagemagick)
232 ("ghostscript" ,ghostscript)
233 ("xvfb" ,xorg-server)))
234 (home-page "http://pcb.geda-project.org/")
235 (synopsis "Design printed circuit board layouts")
237 "GNU PCB is an interactive tool for editing printed circuit board
238 layouts. It features a rats-nest implementation, schematic/netlist import,
239 and design rule checking. It also includes an autorouter and a trace
240 optimizer; and it can produce photorealistic and design review images.")
241 (license license:gpl2+)))
243 (define-public pcb-rnd
244 (package (inherit pcb)
249 (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/"
250 "pcb-rnd-" version ".tar.gz"))
253 "0pycynla60b96jkb6fh6f4sx663pqbzjwnixhw5ym8sym2absm09"))))
255 `(#:tests? #f ; no check target
257 (modify-phases %standard-phases
258 (add-after 'unpack 'cc-is-gcc
259 (lambda _ (setenv "CC" "gcc") #t))
261 ;; The configure script doesn't tolerate most of our configure flags.
262 (lambda* (#:key outputs #:allow-other-keys)
263 (zero? (system* "sh" "configure"
264 (string-append "--prefix="
265 (assoc-ref outputs "out")))))))))
266 (home-page "http://repo.hu/projects/pcb-rnd/")
267 (description "PCB RND is a fork of the GNU PCB circuit board editing tool
268 featuring various improvements and bug fixes.")))
270 (define-public fastcap
273 (version "2.0-18Sep92")
275 (method url-fetch/tarbomb)
276 (uri (string-append "http://www.rle.mit.edu/cpg/codes/"
277 name "-" version ".tgz"))
280 "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k"))
282 ;; Remove a non-free file.
283 '(delete-file "doc/psfig.sty"))
284 (patches (search-patches "fastcap-mulSetup.patch"
285 "fastcap-mulGlobal.patch"))))
286 (build-system gnu-build-system)
288 `(("texlive" ,texlive)
289 ("ghostscript" ,ghostscript)))
291 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
293 #:tests? #f ;; no tests-suite
294 #:modules ((srfi srfi-1)
295 ,@%gnu-build-system-modules)
297 (modify-phases %standard-phases
298 (add-after 'build 'make-doc
300 (zero? (system* "make" "CC=gcc" "RM=rm" "SHELL=sh"
302 (add-before 'make-doc 'fix-doc
304 (substitute* "doc/Makefile" (("/bin/rm") (which "rm")))
305 (substitute* (find-files "doc" "\\.tex")
306 (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}"
308 (string-append "\\includegraphics[scale=" scale "]{"
310 (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}"
312 (string-append "\\includegraphics[width=" width "]{"
314 (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}"
316 (string-append "\\includegraphics[height=" height "]{"
318 (("\\\\psfig\\{figure=([^,]*)\\}" all file)
319 (string-append "\\includegraphics{" file "}")))
320 (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex")
321 (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}"
323 (string-append "\\documentclass[" options "]{"
325 "\\usepackage{graphicx}\n"
326 "\\usepackage{robinspace}"))
327 (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all)
328 (string-append "%" all))
329 (("\\\\setstretch\\{.*\\}" all)
330 (string-append "%" all)))
333 (add-before 'install 'clean-bin
335 (delete-file (string-append (getcwd) "/bin/README"))
337 (add-before 'install 'make-pdf
339 (with-directory-excursion "doc"
341 (every (lambda (file)
342 (zero? (system* "dvips" file "-o")))
343 (find-files "." "\\.dvi"))
344 (every (lambda (file)
345 (zero? (system* "ps2pdf" file)))
346 '("mtt.ps" "ug.ps" "tcad.ps"))
347 (zero? (system* "make" "clean"))))))
349 (lambda* (#:key outputs #:allow-other-keys)
350 (let* ((out (assoc-ref outputs "out"))
351 (data (string-append out "/share"))
352 (bin (string-append out "/bin"))
353 (doc (string-append data "/doc/" ,name "-" ,version))
354 (examples (string-append doc "/examples")))
355 (with-directory-excursion "bin"
356 (for-each (lambda (f)
357 (install-file f bin))
358 (find-files "." ".*")))
359 (copy-recursively "doc" doc)
360 (copy-recursively "examples" examples)
362 (home-page "http://www.rle.mit.edu/cpg/research_codes.htm")
363 (synopsis "Multipole-accelerated capacitance extraction program")
365 "Fastcap is a capacitance extraction program based on a
366 multipole-accelerated algorithm.")
367 (license (license:non-copyleft #f "See fastcap.c."))))
369 (define-public fasthenry
372 (version "3.0-12Nov96")
375 (file-name (string-append name "-" version ".tar.gz"))
377 "http://www.rle.mit.edu/cpg/codes/" name
378 "-" version ".tar.z"))
380 (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
381 (patches (search-patches "fasthenry-spAllocate.patch"
382 "fasthenry-spBuild.patch"
383 "fasthenry-spUtils.patch"
384 "fasthenry-spSolve.patch"
385 "fasthenry-spFactor.patch"))))
386 (build-system gnu-build-system)
388 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
390 #:tests? #f ;; no tests-suite
391 #:modules ((srfi srfi-1)
392 ,@%gnu-build-system-modules)
394 (modify-phases %standard-phases
397 (lambda* (#:key outputs #:allow-other-keys)
398 (let* ((out (assoc-ref outputs "out"))
399 (data (string-append out "/share"))
400 (bin (string-append out "/bin"))
401 (doc (string-append data "/doc/" ,name "-" ,version))
402 (examples (string-append doc "/examples")))
403 (with-directory-excursion "bin"
404 (for-each (lambda (f)
405 (install-file f bin))
406 (find-files "." ".*")))
407 (copy-recursively "doc" doc)
408 (copy-recursively "examples" examples)
410 (home-page "http://www.rle.mit.edu/cpg/research_codes.htm")
411 (synopsis "Multipole-accelerated inductance analysis program")
413 "Fasthenry is an inductance extraction program based on a
414 multipole-accelerated algorithm.")
415 (license (license:non-copyleft #f "See induct.c."))))
417 (define-public fritzing
423 (uri (string-append "https://github.com/fritzing/"
424 "fritzing-app/archive/" version ".tar.gz"))
425 (file-name (string-append name "-" version ".tar.gz"))
428 "0pvk57z2pxz89pcwwm61lkpvj4w9qxqz8mi0zkpj6pnaljabp7bf"))))
429 (build-system gnu-build-system)
432 (modify-phases %standard-phases
434 (lambda* (#:key inputs outputs #:allow-other-keys)
435 (and (zero? (system* "tar"
436 "-xvf" (assoc-ref inputs "fritzing-parts-db")
438 (zero? (system* "qmake"
439 (string-append "PREFIX="
440 (assoc-ref outputs "out"))
441 "phoenix.pro"))))))))
444 ("qtserialport" ,qtserialport)
451 (uri (string-append "https://github.com/fritzing/"
452 "fritzing-parts/archive/" version ".tar.gz"))
453 (file-name (string-append "fritzing-parts-" version ".tar.gz"))
456 "0jqr8yjg7177f3pk1fcns584r0qavwpr280nggsi2ff3pwk5wpsz"))))))
457 (home-page "http://fritzing.org")
458 (synopsis "Electronic circuit design")
460 "The Fritzing application is @dfn{Electronic Design Automation} (EDA)
461 software with a low entry barrier, suited for the needs of makers and
462 hobbyists. It offers a unique real-life \"breadboard\" view, and a parts
463 library with many commonly used high-level components. Fritzing makes it very
464 easy to communicate about circuits, as well as to turn them into PCB layouts
465 ready for production.")
466 ;; Documentation and parts are released under CC-BY-SA 3.0; source code is
467 ;; released under GPLv3+.
468 (license (list license:gpl3+ license:cc-by-sa3.0))))
476 (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-"
477 version "/gerbv-" version ".tar.gz"))
480 "0v6ry0mxi5qym4z0y0lpblxsw9dfjpgxs4c4v2ngg7yw4b3a59ks"))))
481 (build-system gnu-build-system)
484 (modify-phases %standard-phases
485 (add-before 'configure 'autoconf
487 ;; Build rules contain references to Russian translation, but the
488 ;; needed files are missing; see
489 ;; http://sourceforge.net/p/gerbv/bugs/174/
490 (delete-file "po/LINGUAS")
491 (substitute* "man/Makefile.am"
492 (("PO_FILES= gerbv.ru.1.in.po") "")
493 (("man_MANS = gerbv.1 gerbv.ru.1") "man_MANS = gerbv.1"))
494 (zero? (system* "autoreconf" "-vfi")))))))
496 `(("autoconf" ,autoconf)
497 ("automake" ,automake)
499 ("gettext" ,gettext-minimal)
501 ("pkg-config" ,pkg-config)))
505 ("desktop-file-utils" ,desktop-file-utils)))
506 (home-page "http://gerbv.geda-project.org/")
507 (synopsis "Gerber file viewer")
509 "Gerbv is a viewer for files in the Gerber format (RS-274X only), which
510 is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets
511 you load several files on top of each other, do measurements on the displayed
512 image, etc. Besides viewing Gerbers, you may also view Excellon drill files
513 as well as pick-place files.")
514 (license license:gpl2+)))
517 (let ((commit "0bc2354b8dcd1a82a0fd6647706b126045e52734"))
519 (name "ao-cad") ;XXX: really "ao", but it collides with libao
520 (version (string-append "0." (string-take commit 7)))
524 (url "https://github.com/mkeeter/ao")
528 "0lm7iljklafs8dhlvaab2yhwx4xymrdjrqk9c5xvn59hlvbgl1j5"))
529 (file-name (string-append name "-" version "-checkout"))
530 (modules '((guix build utils)))
532 ;; Remove bundled libraries: Eigen, glm, and catch. TODO:
533 ;; Unbundle efsw <https://github.com/diegostamigni/efsw>.
535 (delete-file-recursively "vendor")
537 ;; Use #include <catch.hpp>.
538 (substitute* (find-files "." "\\.[ch]pp$")
539 (("catch/catch\\.hpp")
541 (build-system cmake-build-system)
543 `(;; Have the RUNPATH of libao.so point to $libdir, where libefsw.so
545 #:configure-flags (list (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
547 (assoc-ref %outputs "out")
551 (modify-phases %standard-phases
552 (add-before 'build 'add-eigen-to-search-path
553 (lambda* (#:key inputs #:allow-other-keys)
554 ;; Allow things to find our own Eigen and Catch.
555 (let ((eigen (assoc-ref inputs "eigen")))
556 (setenv "CPLUS_INCLUDE_PATH"
557 (string-append eigen "/include/eigen3:"
558 (getenv "CPLUS_INCLUDE_PATH")))
560 (add-after 'install 'install-guile-bindings
561 (lambda* (#:key inputs outputs #:allow-other-keys)
562 ;; Install the Guile bindings (the build system only installs
564 (let* ((out (assoc-ref outputs "out"))
565 (moddir (string-append out "/share/guile/site/2.0")))
566 (install-file "bind/libao.so"
567 (string-append out "/lib"))
569 ;; Go to the source directory.
570 (with-directory-excursion ,(string-append "../"
573 (substitute* "bind/guile/ao/bind.scm"
574 (("\\(define libao \\(dynamic-link .*$")
575 (string-append "(define libao (dynamic-link \""
576 out "/lib/libao\")) ;")))
578 (for-each (lambda (file)
580 (string-append moddir
582 (find-files "bind/guile" "\\.scm$"))
584 (substitute* "bin/ao-guile"
585 (("\\(add-to-load-path .*")
586 (string-append "(add-to-load-path \"" moddir "\")")))
588 (install-file "bin/ao-guile"
589 (string-append out "/bin"))
591 ;; Allow Ao to dlopen the relevant GL libraries. Otherwise
593 ;; Couldn't find current GLX or EGL context.
594 (let ((mesa (assoc-ref inputs "mesa")))
595 (wrap-program (string-append out "/bin/ao-guile")
596 `("LD_LIBRARY_PATH" ":" prefix
597 (,(string-append mesa "/lib")))))
600 `(("pkg-config" ,pkg-config)))
603 ("catch" ,catch-framework)
606 ("libepoxy" ,libepoxy)
610 ("guile" ,guile-2.0)))
611 (home-page "http://www.mattkeeter.com/projects/ao/")
612 (synopsis "Tool for programmatic computer-aided design")
614 "Ao is a tool for programmatic computer-aided design (CAD). In Ao,
615 solid models are defined as Scheme scripts, and there are no opaque function
616 calls into the geometry kernel: everything is visible to the user. Even
617 fundamental, primitive shapes are represented as code in the user-level
619 (license (list license:lgpl2.1+ ;library
620 license:gpl2+))))) ;Guile bindings
622 ;; We use kicad from a git commit, because support for boost 1.61.0 has been
625 (let ((commit "4ee344e150bfaf3a6f3f7bf935fb96ae07c423fa")
629 (version (string-append "4.0-" revision "."
630 (string-take commit 7)))
635 (url "https://git.launchpad.net/kicad")
638 (base32 "0kf6r92nps0658i9n3p9vp5dzbssmc22lvjv5flyvnlf83l63s4n"))
639 (file-name (string-append name "-" version "-checkout"))))
640 (build-system cmake-build-system)
642 `(#:out-of-source? #t
643 #:tests? #f ; no tests
645 (list "-DKICAD_STABLE_VERSION=ON"
646 "-DKICAD_REPO_NAME=stable"
647 ,(string-append "-DKICAD_BUILD_VERSION=4.0-"
648 (string-take commit 7))
649 "-DCMAKE_BUILD_TYPE=Release"
650 "-DKICAD_SKIP_BOOST=ON"; Use our system's boost library.
651 "-DKICAD_SCRIPTING=ON"
652 "-DKICAD_SCRIPTING_MODULES=ON"
653 "-DKICAD_SCRIPTING_WXPYTHON=ON"
654 ;; Has to be set explicitely, as we don't have the wxPython
655 ;; headers in the wxwidgets store item, but in wxPython.
656 (string-append "-DCMAKE_CXX_FLAGS=-I"
657 (assoc-ref %build-inputs "wxpython")
659 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
660 ;; TODO: Enable this when CA certs are working with curl.
661 "-DBUILD_GITHUB_PLUGIN=OFF")
663 (modify-phases %standard-phases
664 (add-after 'install 'wrap-program
665 ;; Ensure correct Python at runtime.
666 (lambda* (#:key inputs outputs #:allow-other-keys)
667 (let* ((out (assoc-ref outputs "out"))
668 (python (assoc-ref inputs "python"))
669 (file (string-append out "/bin/kicad"))
672 "/lib/python2.7/site-packages:"
673 (getenv "PYTHONPATH"))))
675 `("PYTHONPATH" ":" prefix (,path))
677 (,(string-append python "/bin:")))))
681 ("gettext" ,gnu-gettext)
682 ("pkg-config" ,pkg-config)
688 ("desktop-file-utils" ,desktop-file-utils)
691 ("hicolor-icon-theme" ,hicolor-icon-theme)
696 ("wxwidgets" ,wxwidgets-gtk2)
697 ("wxpython" ,python2-wxpython)))
698 (home-page "http://kicad-pcb.org/")
699 (synopsis "Electronics Design Automation Suite")
700 (description "Kicad is a program for the formation of printed circuit
701 boards and electrical circuits. The software has a number of programs that
702 perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing
703 electrical diagrams), gerbview (viewing Gerber files) and others.")
704 (license license:gpl3+))))
706 (define-public kicad-library
707 (let ((version "4.0.4"))
709 (name "kicad-library")
714 "http://downloads.kicad-pcb.org/libraries/kicad-library-"
718 "1wyda58y39lhxml0xv1ngvddi0nqihx9bnlza46ajzms38ajvh12"))))
719 (build-system cmake-build-system)
721 `(#:out-of-source? #t
722 #:tests? #f ; no tests
724 (modify-phases %standard-phases
725 (add-after 'install 'install-footprints ; from footprints tarball
726 (lambda* (#:key inputs outputs #:allow-other-keys)
727 (zero? (system* "tar" "xvf"
728 (assoc-ref inputs "kicad-footprints")
729 "-C" (string-append (assoc-ref outputs "out")
730 "/share/kicad/modules")
731 "--strip-components=1"))))
732 ;; We change the default global footprint file, which is generated if
733 ;; it doesn't exist in user's home directory, from the one using the
734 ;; github plugin, to the one using the KISYSMOD environment path.
735 (add-after 'install-footprints 'use-pretty-footprint-table
736 (lambda* (#:key outputs #:allow-other-keys)
737 (let* ((out (assoc-ref outputs "out"))
738 (template-dir (string-append out "/share/kicad/template"))
739 (fp-lib-table (string-append template-dir "/fp-lib-table")))
740 (delete-file fp-lib-table)
741 (copy-file (string-append fp-lib-table ".for-pretty")
745 (list (search-path-specification
746 (variable "KISYSMOD") ; footprint path
747 (files '("share/kicad/modules")))
748 (search-path-specification
749 (variable "KISYS3DMOD") ; 3D model path
750 (files '("share/kicad/modules/packages3d")))))
751 ;; Kicad distributes footprints in a separate tarball
753 `(("kicad-footprints"
757 "http://downloads.kicad-pcb.org/libraries/kicad-footprints-"
761 "0ya4gg6clz3vp2wrb67xwg0bhwh5q8ag39jjmpcp4zjcqs1f48rb"))))))
762 (home-page "http://kicad-pcb.org/")
763 (synopsis "Libraries for kicad")
764 (description "This package provides Kicad component, footprint and 3D
765 render model libraries.")
766 (license license:lgpl2.0+))))
768 (define-public linsmith
775 "mirror://sourceforge/linsmith/linsmith/linsmith-"
776 version "/linsmith-" version ".tar.gz"))
779 "18qslhr2r45rhpj4v6bjcqx189vs0bflvsj271wr7w8kvh69qwvn"))))
780 (build-system gnu-build-system)
782 `(("pkg-config" ,pkg-config)
784 ("libgnome" ,libgnomeui)))
785 (home-page "http://jcoppens.com/soft/linsmith/index.en.php")
786 (synopsis "Smith Charting program")
787 (description "LinSmith is a Smith Charting program, mainly designed for
788 educational use. As such, there is an emphasis on capabilities that improve
789 the 'showing the effect of'-style of operation.")
790 (license license:gpl2+)))
799 (uri (string-append "http://libvolk.org/releases/volk-"
803 "1bz3ywc6y5wmz3i8p4z2wbzhns8bc0ywdkl9qnxpcvfcscarbdlh"))))
804 (build-system cmake-build-system)
808 `(("python-2", python-2)
809 ("python2-cheetah" ,python2-cheetah)))
810 (home-page "http://libvolk.org/")
811 (synopsis "Vector-Optimized Library of Kernels")
813 "@code{volk} contains procedures with machine-specific optimizations
814 for mathematical functions. It also provides an machine-independent
815 interface to select the best such procedures to use on a given system.")
816 (license license:gpl3+)))
818 (define-public minicom
825 (uri (string-append "https://alioth.debian.org/frs/download.php/"
826 "file/4215/" name "-" version ".tar.gz"))
829 "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk"))))
830 (build-system gnu-build-system)
832 `(#:configure-flags '("--enable-lock-dir=/var/lock")
834 (modify-phases %standard-phases
835 (add-after 'unpack 'patch-lock-check
837 (substitute* "configure"
838 (("test -d [$]UUCPLOCK") "true"))
841 `(("ncurses" ,ncurses)))
842 (home-page "https://alioth.debian.org/projects/minicom/")
843 (synopsis "Serial terminal emulator")
844 (description "@code{minicom} is a serial terminal emulator.")
845 (license license:gpl2+)))