1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)
26 #:use-module (guix build-system cmake)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages fontutils)
30 #:use-module ((gnu packages gettext)
31 #:renamer (symbol-prefix-proc 'gnu:))
32 #:use-module (gnu packages gcc)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages multiprecision)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages python)
38 #:use-module (gnu packages readline)
39 #:use-module (gnu packages xml))
47 (uri (string-append "mirror://gnu/units/units-" version
50 "16jfji9g1zc99agd5dcinajinhcxr4dgq2lrbc9md69ir5qgld1b"))))
51 (build-system gnu-build-system)
52 (synopsis "Conversion between thousands of scales")
54 "Units is a program for converting measured quantities between units of
55 measure. It can handle scale changes through adaptive usage of standard
56 scale prefixes (i.e. micro-, kilo-, etc.). It can also handle nonlinear
57 conversions such as Fahrenheit to Celcius. Its interpreter is powerful
58 enough to be used effectively as a scientific calculator.")
59 (license license:gpl3+)
60 (home-page "http://www.gnu.org/software/units/")))
69 (uri (string-append "mirror://gnu/gsl/gsl-"
73 "0lrgipi0z6559jqh82yx8n4xgnxkhzj46v96dl77hahdp58jzg3k"))))
74 (build-system gnu-build-system)
76 `(#:parallel-tests? #f
80 (lambda* (#:key target system outputs #:allow-other-keys #:rest args)
81 (let ((configure (assoc-ref %standard-phases 'configure)))
82 ;; disable numerically unstable test on i686, see thread at
83 ;; http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
84 (if (string=? (or target system) "i686-linux")
85 (substitute* "ode-initval2/Makefile.in"
86 (("TESTS = \\$\\(check_PROGRAMS\\)") "TESTS =")))
87 (apply configure args)))
89 (home-page "http://www.gnu.org/software/gsl/")
90 (synopsis "Numerical library for C and C++")
92 "The GNU Scientific Library is a library for numerical analysis in C
93 and C++. It includes a wide range of mathematical routines, with over 1000
94 functions in total. Subject areas covered by the library include:
95 differential equations, linear algebra, Fast Fourier Transforms and random
97 (license license:gpl3+)))
106 (uri (string-append "mirror://gnu/glpk/glpk-"
110 "0nz9ngmx23c8gbjr8l8ygnfaanxj2mwbl8awpg630bgrkxdnhc9j"))))
111 (build-system gnu-build-system)
115 `(#:configure-flags '("--with-gmp")))
116 (home-page "http://www.gnu.org/software/glpk/")
117 (synopsis "NU Linear Programming Kit, supporting the MathProg language")
119 "GLPK is a C library for solving large-scale linear programming (LP),
120 mixed integer programming (MIP), and other related problems. It supports the
121 GNU MathProg modeling language, a subset of the AMPL language, and features a
122 translator for the language. In addition to the C library, a stand-alone
123 LP/MIP solver is included in the package.")
124 (license license:gpl3+)))
133 (uri (string-append "mirror://gnu/pspp/pspp-"
137 "0qhxsdbwxd3cn1shc13wxvx2lg32lp4z6sz24kv3jz7p5xfi8j7x"))
138 (patches (list (search-patch "pspp-tests.patch")))))
139 (build-system gnu-build-system)
142 ("fontconfig" ,fontconfig)
143 ("gettext" ,gnu:gettext)
147 ("readline" ,readline)
151 ("pkg-config" ,pkg-config)))
154 `("--without-gui"))) ; FIXME: package missing dependencies
155 (home-page "http://www.gnu.org/software/pspp/")
156 (synopsis "Statistical analysis")
158 "PSPP is a statistical analysis program. It can perform descriptive
159 statistics, T-tests, linear regression and non-parametric tests. It features
160 both a graphical interface as well as command-line input. PSPP is designed to
161 interoperate with Gnumeric, LibreOffice and OpenOffice. Data can be imported
162 from spreadsheets, text files and database sources and it can be output in
163 text, Postscript, PDF or HTML.")
164 (license license:gpl3+)))
166 (define-public lapack
173 (uri (string-append "http://www.netlib.org/lapack/lapack-"
177 "1w7sf8888m7fi2kyx1fzgbm22193l8c2d53m8q1ibhvfy6m5v9k0"))
179 ;; Remove non-free files.
180 ;; See <http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01383.html>.
181 '(for-each (lambda (file)
182 (format #t "removing '~a'~%" file)
184 '("lapacke/example/example_DGESV_rowmajor.c"
185 "lapacke/example/example_ZGESV_rowmajor.c"
186 "DOCS/psfig.tex")))))
187 (build-system cmake-build-system)
188 (home-page "http://www.netlib.org/lapack/")
189 (inputs `(("fortran" ,gfortran-4.8)
190 ("python" ,python-2)))
192 `(#:modules ((guix build cmake-build-system)
195 #:phases (alist-cons-before
197 (lambda* (#:key inputs #:allow-other-keys)
198 (let ((python (assoc-ref inputs "python")))
199 (substitute* "lapack_testing.py"
200 (("/usr/bin/env python") python))))
202 (synopsis "Library for numerical linear algebra")
204 "LAPACK is a Fortran 90 library for solving the most commonly occurring
205 problems in numerical linear algebra.")
206 (license (license:bsd-style "file://LICENSE"
207 "See LICENSE in the distribution."))))