1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 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 gd)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages ghostscript)
50 #:use-module (gnu packages gl)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages guile)
55 #:use-module (gnu packages image)
56 #:use-module (gnu packages linux) ;FIXME: for pcb
57 #:use-module (gnu packages m4)
58 #:use-module (gnu packages maths)
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages qt)
63 #:use-module (gnu packages swig)
64 #:use-module (gnu packages tcl)
65 #:use-module (gnu packages tls)
66 #:use-module (gnu packages tex)
67 #:use-module (gnu packages wxwidgets)
68 #:use-module (gnu packages xorg)
69 #:use-module (srfi srfi-1))
71 (define-public librecad
78 "https://github.com/LibreCAD/LibreCAD/archive/"
80 (file-name (string-append name "-" version ".tar.gz"))
83 "01nvc1g3si05r5np1pzn62ah9w84p8nxa32wqrjh6gdi17jfvi3l"))))
84 (build-system gnu-build-system)
87 (modify-phases %standard-phases
88 (add-after 'unpack 'patch-paths
89 (lambda* (#:key outputs #:allow-other-keys)
90 (let ((out (assoc-ref outputs "out")))
91 (substitute* "librecad/src/lib/engine/rs_system.cpp"
92 (("/usr/share") (string-append out "/share"))))))
94 (lambda* (#:key inputs #:allow-other-keys)
95 (system* "qmake" (string-append "BOOST_DIR="
96 (assoc-ref inputs "boost")))))
98 (lambda* (#:key outputs #:allow-other-keys)
99 (let ((out (assoc-ref outputs "out")))
100 (mkdir-p (string-append out "/bin"))
101 (mkdir-p (string-append out "/share/librecad"))
102 (copy-file "unix/librecad"
103 (string-append out "/bin/librecad"))
104 (copy-recursively "unix/resources"
105 (string-append out "/share/librecad"))))))))
108 ("muparser" ,muparser)
109 ("freetype" ,freetype)
112 `(("pkg-config" ,pkg-config)
114 (home-page "http://librecad.org/")
115 (synopsis "Computer-aided design (CAD) application")
117 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
119 (license license:gpl2)))
121 (define-public geda-gaf
128 "http://ftp.geda-project.org/geda-gaf/unstable/v"
129 (version-major+minor version) "/"
130 version "/geda-gaf-" version ".tar.gz"))
133 "14mk45pfz11v54q66gafw2l68n1p5ssvvjmdm8ffgc8x1w5ajfrz"))))
134 (build-system gnu-build-system)
137 (modify-phases %standard-phases
138 ;; tests require a writable HOME
139 (add-before 'check 'set-home
141 (setenv "HOME" (getenv "TMPDIR"))
144 (let ((pcb (assoc-ref %build-inputs "pcb")))
145 (list (string-append "--with-pcb-datadir=" pcb "/share")
146 (string-append "--with-pcb-lib-path="
147 pcb "/share/pcb/pcblib-newlib:"
148 pcb "/share/pcb/newlib")))))
153 ("desktop-file-utils" ,desktop-file-utils)
154 ("shared-mime-info" ,shared-mime-info)
158 `(("pkg-config" ,pkg-config)
159 ("perl" ,perl))) ; for tests
160 (home-page "http://geda-project.org/")
161 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
163 "Gaf stands for “gschem and friends”. It is a subset of the entire tool
164 suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
165 which currently includes: gschem, a schematic capture program; gnetlist, a
166 netlist generation program; gsymcheck, a syntax checker for schematic symbols;
167 gattrib, a spreadsheet programm that manipulates the properties of symbols of
168 a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
169 tool to forward annotation from your schematic to layout using PCB; some minor
171 (license license:gpl2+)))
180 "http://ftp.geda-project.org/pcb/pcb-" version "/pcb-"
184 "0l6944hq79qsyp60i5ai02xwyp8l47q7xdm3js0jfkpf72ag7i42"))))
185 (build-system gnu-build-system)
191 (substitute* "configure"
192 (("wish85") "wish8.6")))
195 (lambda* (#:key inputs outputs #:allow-other-keys)
196 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
197 ;; fix of the mesa package we wrap the pcb executable such that
198 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
199 (let* ((out (assoc-ref outputs "out"))
200 (path (string-append (assoc-ref inputs "udev") "/lib")))
201 (wrap-program (string-append out "/bin/pcb")
202 `("LD_LIBRARY_PATH" ":" prefix (,path)))))
207 ("udev" ,eudev) ;FIXME: required by mesa
211 ("gtkglext" ,gtkglext)
212 ("desktop-file-utils" ,desktop-file-utils)
213 ("shared-mime-info" ,shared-mime-info)
216 `(("pkg-config" ,pkg-config)
217 ("intltool" ,intltool)
220 (home-page "http://pcb.geda-project.org/")
221 (synopsis "Design printed circuit board layouts")
223 "GNU PCB is an interactive tool for editing printed circuit board
224 layouts. It features a rats-nest implementation, schematic/netlist import,
225 and design rule checking. It also includes an autorouter and a trace
226 optimizer; and it can produce photorealistic and design review images.")
227 (license license:gpl2+)))
229 (define-public pcb-rnd
230 (package (inherit pcb)
235 (uri (string-append "http://repo.hu/projects/pcb-rnd/releases/"
236 "pcb-rnd-" version ".tar.gz"))
239 "0pycynla60b96jkb6fh6f4sx663pqbzjwnixhw5ym8sym2absm09"))))
241 `(#:tests? #f ; no check target
243 (modify-phases %standard-phases
244 (add-after 'unpack 'cc-is-gcc
245 (lambda _ (setenv "CC" "gcc") #t))
247 ;; The configure script doesn't tolerate most of our configure flags.
248 (lambda* (#:key outputs #:allow-other-keys)
249 (zero? (system* "sh" "configure"
250 (string-append "--prefix="
251 (assoc-ref outputs "out")))))))))
252 (home-page "http://repo.hu/projects/pcb-rnd/")
253 (description "PCB RND is a fork of the GNU PCB circuit board editing tool
254 featuring various improvements and bug fixes.")))
256 (define-public fastcap
259 (version "2.0-18Sep92")
261 (method url-fetch/tarbomb)
262 (uri (string-append "http://www.rle.mit.edu/cpg/codes/"
263 name "-" version ".tgz"))
266 "0x37vfp6k0d2z3gnig0hbicvi0jp8v267xjnn3z8jdllpiaa6p3k"))
268 ;; Remove a non-free file.
269 '(delete-file "doc/psfig.sty"))
270 (patches (search-patches "fastcap-mulSetup.patch"
271 "fastcap-mulGlobal.patch"))))
272 (build-system gnu-build-system)
274 `(("texlive" ,texlive)
275 ("ghostscript" ,ghostscript)))
277 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
279 #:tests? #f ;; no tests-suite
280 #:modules ((srfi srfi-1)
281 ,@%gnu-build-system-modules)
283 (modify-phases %standard-phases
284 (add-after 'build 'make-doc
286 (zero? (system* "make" "CC=gcc" "RM=rm" "SHELL=sh"
288 (add-before 'make-doc 'fix-doc
290 (substitute* "doc/Makefile" (("/bin/rm") (which "rm")))
291 (substitute* (find-files "doc" "\\.tex")
292 (("\\\\special\\{psfile=([^,]*),.*scale=([#0-9.]*).*\\}"
294 (string-append "\\includegraphics[scale=" scale "]{"
296 (("\\\\psfig\\{figure=([^,]*),.*width=([#0-9.]*in).*\\}"
298 (string-append "\\includegraphics[width=" width "]{"
300 (("\\\\psfig\\{figure=([^,]*),.*height=([#0-9.]*in).*\\}"
302 (string-append "\\includegraphics[height=" height "]{"
304 (("\\\\psfig\\{figure=([^,]*)\\}" all file)
305 (string-append "\\includegraphics{" file "}")))
306 (substitute* '("doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex")
307 (("^\\\\documentstyle\\[(.*)\\]\\{(.*)\\}"
309 (string-append "\\documentclass[" options "]{"
311 "\\usepackage{graphicx}\n"
312 "\\usepackage{robinspace}"))
313 (("\\\\setlength\\{\\\\footheight\\}\\{.*\\}" all)
314 (string-append "%" all))
315 (("\\\\setstretch\\{.*\\}" all)
316 (string-append "%" all)))
319 (add-before 'install 'clean-bin
321 (delete-file (string-append (getcwd) "/bin/README"))
323 (add-before 'install 'make-pdf
325 (with-directory-excursion "doc"
327 (every (lambda (file)
328 (zero? (system* "dvips" file "-o")))
329 (find-files "." "\\.dvi"))
330 (every (lambda (file)
331 (zero? (system* "ps2pdf" file)))
332 '("mtt.ps" "ug.ps" "tcad.ps"))
333 (zero? (system* "make" "clean"))))))
335 (lambda* (#:key outputs #:allow-other-keys)
336 (let* ((out (assoc-ref outputs "out"))
337 (data (string-append out "/share"))
338 (bin (string-append out "/bin"))
339 (doc (string-append data "/doc/" ,name "-" ,version))
340 (examples (string-append doc "/examples")))
341 (with-directory-excursion "bin"
342 (for-each (lambda (f)
343 (install-file f bin))
344 (find-files "." ".*")))
345 (copy-recursively "doc" doc)
346 (copy-recursively "examples" examples)
348 (home-page "http://www.rle.mit.edu/cpg/research_codes.htm")
349 (synopsis "Multipole-accelerated capacitance extraction program")
351 "Fastcap is a capacitance extraction program based on a
352 multipole-accelerated algorithm.")
353 (license (license:non-copyleft #f "See fastcap.c."))))
355 (define-public fasthenry
358 (version "3.0-12Nov96")
361 (file-name (string-append name "-" version ".tar.gz"))
363 "http://www.rle.mit.edu/cpg/codes/" name
364 "-" version ".tar.z"))
366 (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
367 (patches (search-patches "fasthenry-spAllocate.patch"
368 "fasthenry-spBuild.patch"
369 "fasthenry-spUtils.patch"
370 "fasthenry-spSolve.patch"
371 "fasthenry-spFactor.patch"))))
372 (build-system gnu-build-system)
374 `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
376 #:tests? #f ;; no tests-suite
377 #:modules ((srfi srfi-1)
378 ,@%gnu-build-system-modules)
380 (modify-phases %standard-phases
383 (lambda* (#:key outputs #:allow-other-keys)
384 (let* ((out (assoc-ref outputs "out"))
385 (data (string-append out "/share"))
386 (bin (string-append out "/bin"))
387 (doc (string-append data "/doc/" ,name "-" ,version))
388 (examples (string-append doc "/examples")))
389 (with-directory-excursion "bin"
390 (for-each (lambda (f)
391 (install-file f bin))
392 (find-files "." ".*")))
393 (copy-recursively "doc" doc)
394 (copy-recursively "examples" examples)
396 (home-page "http://www.rle.mit.edu/cpg/research_codes.htm")
397 (synopsis "Multipole-accelerated inductance analysis program")
399 "Fasthenry is an inductance extraction program based on a
400 multipole-accelerated algorithm.")
401 (license (license:non-copyleft #f "See induct.c."))))
403 (define-public fritzing
409 (uri (string-append "https://github.com/fritzing/"
410 "fritzing-app/archive/" version ".tar.gz"))
411 (file-name (string-append name "-" version ".tar.gz"))
414 "0pvk57z2pxz89pcwwm61lkpvj4w9qxqz8mi0zkpj6pnaljabp7bf"))))
415 (build-system gnu-build-system)
418 (modify-phases %standard-phases
420 (lambda* (#:key inputs outputs #:allow-other-keys)
421 (and (zero? (system* "tar"
422 "-xvf" (assoc-ref inputs "fritzing-parts-db")
424 (zero? (system* "qmake"
425 (string-append "PREFIX="
426 (assoc-ref outputs "out"))
427 "phoenix.pro"))))))))
430 ("qtserialport" ,qtserialport)
437 (uri (string-append "https://github.com/fritzing/"
438 "fritzing-parts/archive/" version ".tar.gz"))
439 (file-name (string-append "fritzing-parts-" version ".tar.gz"))
442 "0jqr8yjg7177f3pk1fcns584r0qavwpr280nggsi2ff3pwk5wpsz"))))))
443 (home-page "http://fritzing.org")
444 (synopsis "Electronic circuit design")
446 "The Fritzing application is @dfn{Electronic Design Automation} (EDA)
447 software with a low entry barrier, suited for the needs of makers and
448 hobbyists. It offers a unique real-life \"breadboard\" view, and a parts
449 library with many commonly used high-level components. Fritzing makes it very
450 easy to communicate about circuits, as well as to turn them into PCB layouts
451 ready for production.")
452 ;; Documentation and parts are released under CC-BY-SA 3.0; source code is
453 ;; released under GPLv3+.
454 (license (list license:gpl3+ license:cc-by-sa3.0))))
462 (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-"
463 version "/gerbv-" version ".tar.gz"))
466 "0v6ry0mxi5qym4z0y0lpblxsw9dfjpgxs4c4v2ngg7yw4b3a59ks"))))
467 (build-system gnu-build-system)
470 (modify-phases %standard-phases
471 (add-before 'configure 'autoconf
473 ;; Build rules contain references to Russian translation, but the
474 ;; needed files are missing; see
475 ;; http://sourceforge.net/p/gerbv/bugs/174/
476 (delete-file "po/LINGUAS")
477 (substitute* "man/Makefile.am"
478 (("PO_FILES= gerbv.ru.1.in.po") "")
479 (("man_MANS = gerbv.1 gerbv.ru.1") "man_MANS = gerbv.1"))
480 (zero? (system* "autoreconf" "-vfi")))))))
482 `(("autoconf" ,autoconf)
483 ("automake" ,automake)
485 ("gettext" ,gettext-minimal)
487 ("pkg-config" ,pkg-config)))
491 ("desktop-file-utils" ,desktop-file-utils)))
492 (home-page "http://gerbv.geda-project.org/")
493 (synopsis "Gerber file viewer")
495 "Gerbv is a viewer for files in the Gerber format (RS-274X only), which
496 is commonly used to represent printed circuit board (PCB) layouts. Gerbv lets
497 you load several files on top of each other, do measurements on the displayed
498 image, etc. Besides viewing Gerbers, you may also view Excellon drill files
499 as well as pick-place files.")
500 (license license:gpl2+)))
503 (let ((commit "0bc2354b8dcd1a82a0fd6647706b126045e52734"))
505 (name "ao-cad") ;XXX: really "ao", but it collides with libao
506 (version (string-append "0." (string-take commit 7)))
510 (url "https://github.com/mkeeter/ao")
514 "0lm7iljklafs8dhlvaab2yhwx4xymrdjrqk9c5xvn59hlvbgl1j5"))
515 (file-name (string-append name "-" version "-checkout"))
516 (modules '((guix build utils)))
518 ;; Remove bundled libraries: Eigen, glm, and catch. TODO:
519 ;; Unbundle efsw <https://github.com/diegostamigni/efsw>.
521 (delete-file-recursively "vendor")
523 ;; Use #include <catch.hpp>.
524 (substitute* (find-files "." "\\.[ch]pp$")
525 (("catch/catch\\.hpp")
527 (build-system cmake-build-system)
529 `(;; Have the RUNPATH of libao.so point to $libdir, where libefsw.so
531 #:configure-flags (list (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
533 (assoc-ref %outputs "out")
537 (modify-phases %standard-phases
538 (add-before 'build 'add-eigen-to-search-path
539 (lambda* (#:key inputs #:allow-other-keys)
540 ;; Allow things to find our own Eigen and Catch.
541 (let ((eigen (assoc-ref inputs "eigen")))
542 (setenv "CPLUS_INCLUDE_PATH"
543 (string-append eigen "/include/eigen3:"
544 (getenv "CPLUS_INCLUDE_PATH")))
546 (add-after 'install 'install-guile-bindings
547 (lambda* (#:key inputs outputs #:allow-other-keys)
548 ;; Install the Guile bindings (the build system only installs
550 (let* ((out (assoc-ref outputs "out"))
551 (moddir (string-append out "/share/guile/site/2.0")))
552 (install-file "bind/libao.so"
553 (string-append out "/lib"))
555 ;; Go to the source directory.
556 (with-directory-excursion ,(string-append "../"
559 (substitute* "bind/guile/ao/bind.scm"
560 (("\\(define libao \\(dynamic-link .*$")
561 (string-append "(define libao (dynamic-link \""
562 out "/lib/libao\")) ;")))
564 (for-each (lambda (file)
566 (string-append moddir
568 (find-files "bind/guile" "\\.scm$"))
570 (substitute* "bin/ao-guile"
571 (("\\(add-to-load-path .*")
572 (string-append "(add-to-load-path \"" moddir "\")")))
574 (install-file "bin/ao-guile"
575 (string-append out "/bin"))
577 ;; Allow Ao to dlopen the relevant GL libraries. Otherwise
579 ;; Couldn't find current GLX or EGL context.
580 (let ((mesa (assoc-ref inputs "mesa")))
581 (wrap-program (string-append out "/bin/ao-guile")
582 `("LD_LIBRARY_PATH" ":" prefix
583 (,(string-append mesa "/lib")))))
586 `(("pkg-config" ,pkg-config)))
589 ("catch" ,catch-framework)
592 ("libepoxy" ,libepoxy)
596 ("guile" ,guile-2.0)))
597 (home-page "http://www.mattkeeter.com/projects/ao/")
598 (synopsis "Tool for programmatic computer-aided design")
600 "Ao is a tool for programmatic computer-aided design (CAD). In Ao,
601 solid models are defined as Scheme scripts, and there are no opaque function
602 calls into the geometry kernel: everything is visible to the user. Even
603 fundamental, primitive shapes are represented as code in the user-level
605 (license (list license:lgpl2.1+ ;library
606 license:gpl2+))))) ;Guile bindings
608 ;; We use kicad from a git commit, because support for boost 1.61.0 has been
611 (let ((commit "4ee344e150bfaf3a6f3f7bf935fb96ae07c423fa")
615 (version (string-append "4.0-" revision "."
616 (string-take commit 7)))
621 (url "https://git.launchpad.net/kicad")
624 (base32 "0kf6r92nps0658i9n3p9vp5dzbssmc22lvjv5flyvnlf83l63s4n"))
625 (file-name (string-append name "-" version "-checkout"))))
626 (build-system cmake-build-system)
628 `(#:out-of-source? #t
629 #:tests? #f ; no tests
631 (list "-DKICAD_STABLE_VERSION=ON"
632 "-DKICAD_REPO_NAME=stable"
633 ,(string-append "-DKICAD_BUILD_VERSION=4.0-"
634 (string-take commit 7))
635 "-DCMAKE_BUILD_TYPE=Release"
636 "-DKICAD_SKIP_BOOST=ON"; Use our system's boost library.
637 "-DKICAD_SCRIPTING=ON"
638 "-DKICAD_SCRIPTING_MODULES=ON"
639 "-DKICAD_SCRIPTING_WXPYTHON=ON"
640 ;; Has to be set explicitely, as we don't have the wxPython
641 ;; headers in the wxwidgets store item, but in wxPython.
642 (string-append "-DCMAKE_CXX_FLAGS=-I"
643 (assoc-ref %build-inputs "wxpython")
645 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
646 ;; TODO: Enable this when CA certs are working with curl.
647 "-DBUILD_GITHUB_PLUGIN=OFF")
649 (modify-phases %standard-phases
650 (add-after 'install 'wrap-program
651 ;; Ensure correct Python at runtime.
652 (lambda* (#:key inputs outputs #:allow-other-keys)
653 (let* ((out (assoc-ref outputs "out"))
654 (python (assoc-ref inputs "python"))
655 (file (string-append out "/bin/kicad"))
658 "/lib/python2.7/site-packages:"
659 (getenv "PYTHONPATH"))))
661 `("PYTHONPATH" ":" prefix (,path))
663 (,(string-append python "/bin:")))))
667 ("gettext" ,gnu-gettext)
668 ("pkg-config" ,pkg-config)
674 ("desktop-file-utils" ,desktop-file-utils)
677 ("hicolor-icon-theme" ,hicolor-icon-theme)
682 ("wxwidgets" ,wxwidgets-gtk2)
683 ("wxpython" ,python2-wxpython)))
684 (home-page "http://kicad-pcb.org/")
685 (synopsis "Electronics Design Automation Suite")
686 (description "Kicad is a program for the formation of printed circuit
687 boards and electrical circuits. The software has a number of programs that
688 perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing
689 electrical diagrams), gerbview (viewing Gerber files) and others.")
690 (license license:gpl3+))))
692 (define-public kicad-library
693 (let ((version "4.0.4"))
695 (name "kicad-library")
700 "http://downloads.kicad-pcb.org/libraries/kicad-library-"
704 "1wyda58y39lhxml0xv1ngvddi0nqihx9bnlza46ajzms38ajvh12"))))
705 (build-system cmake-build-system)
707 `(#:out-of-source? #t
708 #:tests? #f ; no tests
710 (modify-phases %standard-phases
711 (add-after 'install 'install-footprints ; from footprints tarball
712 (lambda* (#:key inputs outputs #:allow-other-keys)
713 (zero? (system* "tar" "xvf"
714 (assoc-ref inputs "kicad-footprints")
715 "-C" (string-append (assoc-ref outputs "out")
716 "/share/kicad/modules")
717 "--strip-components=1"))))
718 ;; We change the default global footprint file, which is generated if
719 ;; it doesn't exist in user's home directory, from the one using the
720 ;; github plugin, to the one using the KISYSMOD environment path.
721 (add-after 'install-footprints 'use-pretty-footprint-table
722 (lambda* (#:key outputs #:allow-other-keys)
723 (let* ((out (assoc-ref outputs "out"))
724 (template-dir (string-append out "/share/kicad/template"))
725 (fp-lib-table (string-append template-dir "/fp-lib-table")))
726 (delete-file fp-lib-table)
727 (copy-file (string-append fp-lib-table ".for-pretty")
731 (list (search-path-specification
732 (variable "KISYSMOD") ; footprint path
733 (files '("share/kicad/modules")))
734 (search-path-specification
735 (variable "KISYS3DMOD") ; 3D model path
736 (files '("share/kicad/modules/packages3d")))))
737 ;; Kicad distributes footprints in a separate tarball
739 `(("kicad-footprints"
743 "http://downloads.kicad-pcb.org/libraries/kicad-footprints-"
747 "0ya4gg6clz3vp2wrb67xwg0bhwh5q8ag39jjmpcp4zjcqs1f48rb"))))))
748 (home-page "http://kicad-pcb.org/")
749 (synopsis "Libraries for kicad")
750 (description "This package provides Kicad component, footprint and 3D
751 render model libraries.")
752 (license license:lgpl2.0+))))
754 (define-public linsmith
761 "mirror://sourceforge/linsmith/linsmith/linsmith-"
762 version "/linsmith-" version ".tar.gz"))
765 "18qslhr2r45rhpj4v6bjcqx189vs0bflvsj271wr7w8kvh69qwvn"))))
766 (build-system gnu-build-system)
768 `(("pkg-config" ,pkg-config)
770 ("libgnome" ,libgnomeui)))
771 (home-page "http://jcoppens.com/soft/linsmith/index.en.php")
772 (synopsis "Smith Charting program")
773 (description "LinSmith is a Smith Charting program, mainly designed for
774 educational use. As such, there is an emphasis on capabilities that improve
775 the 'showing the effect of'-style of operation.")
776 (license license:gpl2+)))