gnu: gettext: Enable "xgettext --language=glade".
[jackhill/guix/guix.git] / gnu / packages / maths.scm
CommitLineData
8f8b2451
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
da95c817 3;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
8f8b2451
AE
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages maths)
21 #:use-module (gnu packages)
22 #:use-module ((guix licenses)
23 #:renamer (symbol-prefix-proc 'license:))
24 #:use-module (guix packages)
25 #:use-module (guix download)
da95c817 26 #:use-module (guix build-system cmake)
c9dfa3c7 27 #:use-module (guix build-system gnu)
c9dfa3c7
AE
28 #:use-module (gnu packages compression)
29 #:use-module ((gnu packages gettext)
30 #:renamer (symbol-prefix-proc 'gnu:))
da95c817 31 #:use-module (gnu packages gcc)
b92eee75 32 #:use-module (gnu packages multiprecision)
c9dfa3c7
AE
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages pkg-config)
da95c817 35 #:use-module (gnu packages python)
c9dfa3c7
AE
36 #:use-module (gnu packages readline)
37 #:use-module (gnu packages xml))
8f8b2451
AE
38
39(define-public units
40 (package
41 (name "units")
d6f10ca3 42 (version "2.02")
8f8b2451
AE
43 (source (origin
44 (method url-fetch)
45 (uri (string-append "mirror://gnu/units/units-" version
46 ".tar.gz"))
47 (sha256 (base32
d6f10ca3 48 "16jfji9g1zc99agd5dcinajinhcxr4dgq2lrbc9md69ir5qgld1b"))))
8f8b2451
AE
49 (build-system gnu-build-system)
50 (synopsis "Conversion between thousands of scales")
51 (description
a22dc0c4
LC
52 "Units is a program for converting measured quantities between units of
53measure. It can handle scale changes through adaptive usage of standard
54scale prefixes (i.e. micro-, kilo-, etc.). It can also handle nonlinear
55conversions such as Fahrenheit to Celcius. Its interpreter is powerful
56enough to be used effectively as a scientific calculator.")
8f8b2451
AE
57 (license license:gpl3+)
58 (home-page "http://www.gnu.org/software/units/")))
c9dfa3c7 59
88bd1804
AE
60(define-public gsl
61 (package
62 (name "gsl")
487da565 63 (version "1.16")
88bd1804
AE
64 (source
65 (origin
66 (method url-fetch)
67 (uri (string-append "mirror://gnu/gsl/gsl-"
68 version ".tar.gz"))
69 (sha256
70 (base32
487da565 71 "0lrgipi0z6559jqh82yx8n4xgnxkhzj46v96dl77hahdp58jzg3k"))))
88bd1804 72 (build-system gnu-build-system)
71e0f288 73 (arguments
487da565
AE
74 `(#:parallel-tests? #f
75 #:phases
71e0f288
AE
76 (alist-replace
77 'configure
78 (lambda* (#:key target system outputs #:allow-other-keys #:rest args)
79 (let ((configure (assoc-ref %standard-phases 'configure)))
80 ;; disable numerically unstable test on i686, see thread at
81 ;; http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
82 (if (string=? (or target system) "i686-linux")
83 (substitute* "ode-initval2/Makefile.in"
84 (("TESTS = \\$\\(check_PROGRAMS\\)") "TESTS =")))
85 (apply configure args)))
86 %standard-phases)))
88bd1804
AE
87 (home-page "http://www.gnu.org/software/gsl/")
88 (synopsis "Numerical library for C and C++")
89 (description
a22dc0c4
LC
90 "The GNU Scientific Library is a library for numerical analysis in C
91and C++. It includes a wide range of mathematical routines, with over 1000
92functions in total. Subject areas covered by the library include:
93differential equations, linear algebra, Fast Fourier Transforms and random
94numbers.")
88bd1804
AE
95 (license license:gpl3+)))
96
b92eee75
AE
97(define-public glpk
98 (package
99 (name "glpk")
100 (version "4.52.1")
101 (source
102 (origin
103 (method url-fetch)
104 (uri (string-append "mirror://gnu/glpk/glpk-"
105 version ".tar.gz"))
106 (sha256
107 (base32
108 "0nz9ngmx23c8gbjr8l8ygnfaanxj2mwbl8awpg630bgrkxdnhc9j"))))
109 (build-system gnu-build-system)
110 (inputs
111 `(("gmp" ,gmp)))
112 (arguments
113 `(#:configure-flags '("--with-gmp")))
114 (home-page "http://www.gnu.org/software/glpk/")
115 (synopsis "NU Linear Programming Kit, supporting the MathProg language")
116 (description
117 "GLPK is a C library for solving large-scale linear programming (LP),
118mixed integer programming (MIP), and other related problems. It supports the
119GNU MathProg modeling language, a subset of the AMPL language, and features a
120translator for the language. In addition to the C library, a stand-alone
121LP/MIP solver is included in the package.")
122 (license license:gpl3+)))
123
c9dfa3c7
AE
124(define-public pspp
125 (package
126 (name "pspp")
78c7e344 127 (version "0.8.1")
c9dfa3c7
AE
128 (source
129 (origin
130 (method url-fetch)
131 (uri (string-append "mirror://gnu/pspp/pspp-"
132 version ".tar.gz"))
133 (sha256
134 (base32
78c7e344 135 "0qhxsdbwxd3cn1shc13wxvx2lg32lp4z6sz24kv3jz7p5xfi8j7x"))))
c9dfa3c7
AE
136 (build-system gnu-build-system)
137 (inputs
138 `(("gettext" ,gnu:gettext)
139 ("gsl" ,gsl)
140 ("libxml2" ,libxml2)
141 ("readline" ,readline)
142 ("zlib" ,zlib)))
143 (native-inputs
144 `(("perl" ,perl)
145 ("pkg-config" ,pkg-config)))
146 (arguments
147 `(#:configure-flags
148 `("--without-cairo" ; FIXME: tests currently fail for lack of font
149 "--without-gui"))) ; FIXME: package missing dependencies
150 (home-page "http://www.gnu.org/software/pspp/")
151 (synopsis "Statistical analysis")
152 (description
a22dc0c4
LC
153 "PSPP is a statistical analysis program. It can perform descriptive
154statistics, T-tests, linear regression and non-parametric tests. It features
155both a graphical interface as well as command-line input. PSPP is designed to
156interoperate with Gnumeric, LibreOffice and OpenOffice. Data can be imported
157from spreadsheets, text files and database sources and it can be output in
158text, Postscript, PDF or HTML.")
c9dfa3c7 159 (license license:gpl3+)))
da95c817
NK
160
161(define-public lapack
162 (package
163 (name "lapack")
164 (version "3.4.2")
165 (source
166 (origin
167 (method url-fetch)
168 (uri (string-append "http://www.netlib.org/lapack/lapack-"
169 version ".tgz"))
170 (sha256
171 (base32
6a995754
LC
172 "1w7sf8888m7fi2kyx1fzgbm22193l8c2d53m8q1ibhvfy6m5v9k0"))
173 (snippet
174 ;; Remove non-free files.
175 ;; See <http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01383.html>.
176 '(for-each (lambda (file)
177 (format #t "removing '~a'~%" file)
178 (delete-file file))
179 '("lapacke/example/example_DGESV_rowmajor.c"
180 "lapacke/example/example_ZGESV_rowmajor.c"
181 "DOCS/psfig.tex")))))
da95c817
NK
182 (build-system cmake-build-system)
183 (home-page "http://www.netlib.org/lapack/")
184 (inputs `(("fortran" ,gfortran-4.8)
185 ("python" ,python-2)))
186 (arguments
187 `(#:modules ((guix build cmake-build-system)
188 (guix build utils)
189 (srfi srfi-1))
190 #:phases (alist-cons-before
6a995754
LC
191 'check 'patch-python
192 (lambda* (#:key inputs #:allow-other-keys)
193 (let ((python (assoc-ref inputs "python")))
194 (substitute* "lapack_testing.py"
195 (("/usr/bin/env python") python))))
196 %standard-phases)))
da95c817
NK
197 (synopsis "Library for numerical linear algebra")
198 (description
199 "LAPACK is a Fortran 90 library for solving the most commonly occurring
200problems in numerical linear algebra.")
201 (license (license:bsd-style "file://LICENSE"
202 "See LICENSE in the distribution."))))