Commit | Line | Data |
---|---|---|
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 | 28 | #:use-module (gnu packages compression) |
f3929800 | 29 | #:use-module (gnu packages fontutils) |
1dba6407 | 30 | #:use-module (gnu packages gettext) |
da95c817 | 31 | #:use-module (gnu packages gcc) |
f3929800 | 32 | #:use-module (gnu packages gtk) |
b92eee75 | 33 | #:use-module (gnu packages multiprecision) |
c9dfa3c7 AE |
34 | #:use-module (gnu packages perl) |
35 | #:use-module (gnu packages pkg-config) | |
da95c817 | 36 | #:use-module (gnu packages python) |
c9dfa3c7 AE |
37 | #:use-module (gnu packages readline) |
38 | #:use-module (gnu packages xml)) | |
8f8b2451 AE |
39 | |
40 | (define-public units | |
41 | (package | |
42 | (name "units") | |
d6f10ca3 | 43 | (version "2.02") |
8f8b2451 AE |
44 | (source (origin |
45 | (method url-fetch) | |
46 | (uri (string-append "mirror://gnu/units/units-" version | |
47 | ".tar.gz")) | |
48 | (sha256 (base32 | |
d6f10ca3 | 49 | "16jfji9g1zc99agd5dcinajinhcxr4dgq2lrbc9md69ir5qgld1b")))) |
8f8b2451 AE |
50 | (build-system gnu-build-system) |
51 | (synopsis "Conversion between thousands of scales") | |
52 | (description | |
79c311b8 | 53 | "GNU Units converts between measured quantities between units of |
a22dc0c4 | 54 | measure. It can handle scale changes through adaptive usage of standard |
79c311b8 LC |
55 | scale prefixes (micro-, kilo-, etc.). It can also handle nonlinear |
56 | conversions such as Fahrenheit to Celsius. Its interpreter is powerful | |
a22dc0c4 | 57 | enough to be used effectively as a scientific calculator.") |
8f8b2451 AE |
58 | (license license:gpl3+) |
59 | (home-page "http://www.gnu.org/software/units/"))) | |
c9dfa3c7 | 60 | |
88bd1804 AE |
61 | (define-public gsl |
62 | (package | |
63 | (name "gsl") | |
487da565 | 64 | (version "1.16") |
88bd1804 AE |
65 | (source |
66 | (origin | |
67 | (method url-fetch) | |
68 | (uri (string-append "mirror://gnu/gsl/gsl-" | |
69 | version ".tar.gz")) | |
70 | (sha256 | |
71 | (base32 | |
487da565 | 72 | "0lrgipi0z6559jqh82yx8n4xgnxkhzj46v96dl77hahdp58jzg3k")))) |
88bd1804 | 73 | (build-system gnu-build-system) |
71e0f288 | 74 | (arguments |
487da565 AE |
75 | `(#:parallel-tests? #f |
76 | #:phases | |
71e0f288 AE |
77 | (alist-replace |
78 | 'configure | |
79 | (lambda* (#:key target system outputs #:allow-other-keys #:rest args) | |
80 | (let ((configure (assoc-ref %standard-phases 'configure))) | |
81 | ;; disable numerically unstable test on i686, see thread at | |
82 | ;; http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html | |
83 | (if (string=? (or target system) "i686-linux") | |
84 | (substitute* "ode-initval2/Makefile.in" | |
85 | (("TESTS = \\$\\(check_PROGRAMS\\)") "TESTS ="))) | |
86 | (apply configure args))) | |
87 | %standard-phases))) | |
88bd1804 AE |
88 | (home-page "http://www.gnu.org/software/gsl/") |
89 | (synopsis "Numerical library for C and C++") | |
90 | (description | |
a22dc0c4 LC |
91 | "The GNU Scientific Library is a library for numerical analysis in C |
92 | and C++. It includes a wide range of mathematical routines, with over 1000 | |
93 | functions in total. Subject areas covered by the library include: | |
94 | differential equations, linear algebra, Fast Fourier Transforms and random | |
95 | numbers.") | |
88bd1804 AE |
96 | (license license:gpl3+))) |
97 | ||
b92eee75 AE |
98 | (define-public glpk |
99 | (package | |
100 | (name "glpk") | |
101 | (version "4.52.1") | |
102 | (source | |
103 | (origin | |
104 | (method url-fetch) | |
105 | (uri (string-append "mirror://gnu/glpk/glpk-" | |
106 | version ".tar.gz")) | |
107 | (sha256 | |
108 | (base32 | |
109 | "0nz9ngmx23c8gbjr8l8ygnfaanxj2mwbl8awpg630bgrkxdnhc9j")))) | |
110 | (build-system gnu-build-system) | |
111 | (inputs | |
112 | `(("gmp" ,gmp))) | |
113 | (arguments | |
114 | `(#:configure-flags '("--with-gmp"))) | |
115 | (home-page "http://www.gnu.org/software/glpk/") | |
79c311b8 | 116 | (synopsis "GNU Linear Programming Kit, supporting the MathProg language") |
b92eee75 AE |
117 | (description |
118 | "GLPK is a C library for solving large-scale linear programming (LP), | |
119 | mixed integer programming (MIP), and other related problems. It supports the | |
120 | GNU MathProg modeling language, a subset of the AMPL language, and features a | |
121 | translator for the language. In addition to the C library, a stand-alone | |
122 | LP/MIP solver is included in the package.") | |
123 | (license license:gpl3+))) | |
124 | ||
c9dfa3c7 AE |
125 | (define-public pspp |
126 | (package | |
127 | (name "pspp") | |
e7d6f7bf | 128 | (version "0.8.2") |
c9dfa3c7 AE |
129 | (source |
130 | (origin | |
131 | (method url-fetch) | |
132 | (uri (string-append "mirror://gnu/pspp/pspp-" | |
133 | version ".tar.gz")) | |
134 | (sha256 | |
135 | (base32 | |
e7d6f7bf | 136 | "1w7h3dglgx0jlq1wb605b8pgfsk2vr1q2q2rj7bsajh9ihbcsixr")))) |
c9dfa3c7 AE |
137 | (build-system gnu-build-system) |
138 | (inputs | |
f3929800 AE |
139 | `(("cairo" ,cairo) |
140 | ("fontconfig" ,fontconfig) | |
1dba6407 | 141 | ("gettext" ,gnu-gettext) |
c9dfa3c7 AE |
142 | ("gsl" ,gsl) |
143 | ("libxml2" ,libxml2) | |
f3929800 | 144 | ("pango" ,pango) |
c9dfa3c7 | 145 | ("readline" ,readline) |
e6a5ce8e JD |
146 | ("gtk" ,gtk+-2) |
147 | ("gtksourceview" ,gtksourceview) | |
c9dfa3c7 AE |
148 | ("zlib" ,zlib))) |
149 | (native-inputs | |
150 | `(("perl" ,perl) | |
151 | ("pkg-config" ,pkg-config))) | |
c9dfa3c7 AE |
152 | (home-page "http://www.gnu.org/software/pspp/") |
153 | (synopsis "Statistical analysis") | |
154 | (description | |
79c311b8 LC |
155 | "GNU PSPP is a statistical analysis program. It can perform |
156 | descriptive statistics, T-tests, linear regression and non-parametric tests. | |
157 | It features both a graphical interface as well as command-line input. PSPP is | |
158 | designed to interoperate with Gnumeric, LibreOffice and OpenOffice. Data can | |
159 | be imported from spreadsheets, text files and database sources and it can be | |
160 | output in text, PostScript, PDF or HTML.") | |
c9dfa3c7 | 161 | (license license:gpl3+))) |
da95c817 NK |
162 | |
163 | (define-public lapack | |
164 | (package | |
165 | (name "lapack") | |
566146ab | 166 | (version "3.5.0") |
da95c817 NK |
167 | (source |
168 | (origin | |
169 | (method url-fetch) | |
170 | (uri (string-append "http://www.netlib.org/lapack/lapack-" | |
171 | version ".tgz")) | |
172 | (sha256 | |
173 | (base32 | |
566146ab | 174 | "0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s")))) |
da95c817 NK |
175 | (build-system cmake-build-system) |
176 | (home-page "http://www.netlib.org/lapack/") | |
177 | (inputs `(("fortran" ,gfortran-4.8) | |
178 | ("python" ,python-2))) | |
179 | (arguments | |
180 | `(#:modules ((guix build cmake-build-system) | |
181 | (guix build utils) | |
182 | (srfi srfi-1)) | |
183 | #:phases (alist-cons-before | |
6a995754 LC |
184 | 'check 'patch-python |
185 | (lambda* (#:key inputs #:allow-other-keys) | |
186 | (let ((python (assoc-ref inputs "python"))) | |
187 | (substitute* "lapack_testing.py" | |
188 | (("/usr/bin/env python") python)))) | |
189 | %standard-phases))) | |
da95c817 NK |
190 | (synopsis "Library for numerical linear algebra") |
191 | (description | |
192 | "LAPACK is a Fortran 90 library for solving the most commonly occurring | |
193 | problems in numerical linear algebra.") | |
194 | (license (license:bsd-style "file://LICENSE" | |
195 | "See LICENSE in the distribution.")))) |