gnu: cross-base: Disable libcilkrts in cross-gcc.
[jackhill/guix/guix.git] / gnu / packages / engineering.scm
CommitLineData
ffb010b5
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
40fbd52a 19(define-module (gnu packages engineering)
ffb010b5
RW
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix git-download)
412726ee 23 #:use-module (guix utils)
ffb010b5
RW
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
5699a3cf 27 #:use-module (gnu packages base)
20500662 28 #:use-module (gnu packages bison)
ffb010b5 29 #:use-module (gnu packages boost)
20500662 30 #:use-module (gnu packages flex)
ffb010b5 31 #:use-module (gnu packages fontutils)
20500662
RW
32 #:use-module (gnu packages gd)
33 #:use-module (gnu packages gl)
412726ee
RW
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages gnome)
36 #:use-module (gnu packages gtk)
37 #:use-module (gnu packages guile)
38cf2ba0 38 #:use-module (gnu packages linux) ;FIXME: for pcb
ffb010b5 39 #:use-module (gnu packages maths)
412726ee 40 #:use-module (gnu packages perl)
ffb010b5
RW
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages qt)
20500662 43 #:use-module (gnu packages tcl)
ffb010b5
RW
44 #:use-module (srfi srfi-1))
45
46(define-public librecad
47 (package
48 (name "librecad")
49 (version "2.0.6-rc")
50 (source (origin
51 (method url-fetch)
52 (uri (string-append
53 "https://github.com/LibreCAD/LibreCAD/archive/"
54 version ".tar.gz"))
55 (file-name (string-append name "-" version))
56 (sha256
57 (base32
58 "1n1mh8asj6yrl5hi438dvizmrbqk1kni5xkizhi3pdmkg7z3hksm"))))
59 (build-system gnu-build-system)
60 (arguments
61 '(#:phases
62 (alist-cons-after
63 'unpack
64 'patch-paths
65 (lambda* (#:key outputs #:allow-other-keys)
66 (let ((out (assoc-ref outputs "out")))
67 (substitute* "librecad/src/lib/engine/rs_system.cpp"
68 (("/usr/share") (string-append out "/share")))))
69 (alist-replace
70 'configure
71 (lambda* (#:key inputs #:allow-other-keys)
72 (system* "qmake" (string-append "BOOST_DIR="
73 (assoc-ref inputs "boost"))))
74 (alist-replace
75 'install
76 (lambda* (#:key outputs #:allow-other-keys)
77 (let ((out (assoc-ref outputs "out")))
78 (mkdir-p (string-append out "/bin"))
79 (mkdir-p (string-append out "/share/librecad"))
80 (copy-file "unix/librecad"
81 (string-append out "/bin/librecad"))
82 (copy-recursively "unix/resources"
83 (string-append out "/share/librecad"))))
84 %standard-phases)))))
85 (inputs
86 `(("boost" ,boost)
87 ("muparser" ,muparser)
88 ("freetype" ,freetype)
89 ("qt" ,qt-4)))
90 (native-inputs
91 `(("pkg-config" ,pkg-config)
92 ("which" ,which)))
93 (home-page "http://librecad.org/")
94 (synopsis "Computer-aided design (CAD) application")
95 (description
96 "LibreCAD is a 2D Computer-aided design (CAD) application for creating
97plans and designs.")
98 (license license:gpl2)))
412726ee
RW
99
100(define-public geda-gaf
101 (package
102 (name "geda-gaf")
103 (version "1.8.2")
104 (source (origin
105 (method url-fetch)
106 (uri (string-append
107 "http://ftp.geda-project.org/geda-gaf/stable/v"
108 (version-major+minor version) "/"
109 version "/geda-gaf-" version ".tar.gz"))
110 (sha256
111 (base32
112 "08dpa506xk4gjbbi8vnxcb640wq4ihlgmhzlssl52nhvxwx7gx5v"))))
113 (build-system gnu-build-system)
114 (arguments
115 '(#:phases
116 ;; tests require a writable HOME
117 (alist-cons-before
118 'check 'set-home
119 (lambda _
120 (setenv "HOME" (getenv "TMPDIR")))
121 %standard-phases)))
122 (inputs
123 `(("glib" ,glib)
124 ("gtk" ,gtk+-2)
125 ("guile" ,guile-2.0)
126 ("desktop-file-utils" ,desktop-file-utils)
127 ("shared-mime-info" ,shared-mime-info)))
128 (native-inputs
129 `(("pkg-config" ,pkg-config)
130 ("perl" ,perl))) ; for tests
131 (home-page "http://geda-project.org/")
132 (synopsis "Schematic capture, netlister, symbols, symbol checker, and utils")
133 (description
134 "gaf stands for “gschem and friends”. It is a subset of the entire tool
135suite grouped together under the gEDA name. gEDA/gaf is a collection of tools
136which currently includes: gschem, a schematic capture program; gnetlist, a
137netlist generation program; gsymcheck, a syntax checker for schematic symbols;
138gattrib, a spreadsheet programm that manipulates the properties of symbols of
139a schematic; libgeda, libraries for gschem gnetlist and gsymcheck; gsch2pcb, a
140tool to forward annotation from your schematic to layout using PCB; some minor
141utilities.")
142 (license license:gpl2+)))
143
20500662
RW
144(define-public pcb
145 (package
146 (name "pcb")
147 (version "20140316")
148 (source (origin
149 (method url-fetch)
150 (uri (string-append
151 "http://ftp.geda-project.org/pcb/pcb-" version "/pcb-"
152 version ".tar.gz"))
153 (sha256
154 (base32
155 "0l6944hq79qsyp60i5ai02xwyp8l47q7xdm3js0jfkpf72ag7i42"))))
156 (build-system gnu-build-system)
157 (arguments
158 `(#:phases
159 (alist-cons-after
160 'unpack 'use-wish8.6
161 (lambda _
162 (substitute* "configure"
163 (("wish85") "wish8.6")))
164 (alist-cons-after
165 'install 'wrap
166 (lambda* (#:key inputs outputs #:allow-other-keys)
167 ;; FIXME: Mesa tries to dlopen libudev.so.0 and fails. Pending a
168 ;; fix of the mesa package we wrap the pcb executable such that
169 ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
170 (let* ((out (assoc-ref outputs "out"))
171 (path (string-append (assoc-ref inputs "udev") "/lib")))
172 (wrap-program (string-append out "/bin/pcb")
173 `("LD_LIBRARY_PATH" ":" prefix (,path)))))
174 %standard-phases))))
175 (inputs
176 `(("dbus" ,dbus)
177 ("mesa" ,mesa)
178 ("udev" ,eudev) ;FIXME: required by mesa
179 ("glu" ,glu)
180 ("gd" ,gd)
181 ("gtk" ,gtk+-2)
182 ("gtkglext" ,gtkglext)
183 ("desktop-file-utils" ,desktop-file-utils)
184 ("shared-mime-info" ,shared-mime-info)
185 ("tk" ,tk)))
186 (native-inputs
187 `(("pkg-config" ,pkg-config)
188 ("intltool" ,intltool)
189 ("bison" ,bison)
190 ("flex" ,flex)))
191 (home-page "http://pcb.geda-project.org/")
192 (synopsis "Design printed circuit board layouts")
193 (description
194 "GNU PCB is an interactive tool for editing printed circuit board
195layouts. It features a rats-nest implementation, schematic/netlist import,
196and design rule checking. It also includes an autorouter and a trace
197optimizer; and it can produce photorealistic and design review images.")
198 (license license:gpl2+)))