You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

205 lines
7.7 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <>
;;; Copyright © 2013 Nikita Karetnikov <>
;;; This file is part of GNU Guix.
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages maths)
#:use-module (gnu packages)
#:use-module ((guix licenses)
#:renamer (symbol-prefix-proc 'license:))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gtk)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages readline)
#:use-module (gnu packages xml))
(define-public units
(name "units")
(version "2.02")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/units/units-" version
(sha256 (base32
(build-system gnu-build-system)
(synopsis "Conversion between thousands of scales")
"GNU Units converts between measured quantities between units of
measure. It can handle scale changes through adaptive usage of standard
scale prefixes (micro-, kilo-, etc.). It can also handle nonlinear
conversions such as Fahrenheit to Celsius. Its interpreter is powerful
enough to be used effectively as a scientific calculator.")
(license license:gpl3+)
(home-page "")))
(define-public gsl
(name "gsl")
(version "1.16")
(method url-fetch)
(uri (string-append "mirror://gnu/gsl/gsl-"
version ".tar.gz"))
(build-system gnu-build-system)
`(#:parallel-tests? #f
(lambda* (#:key target system outputs #:allow-other-keys #:rest args)
(let ((configure (assoc-ref %standard-phases 'configure)))
;; disable numerically unstable test on i686, see thread at
(if (string=? (or target system) "i686-linux")
(substitute* "ode-initval2/"
(("TESTS = \\$\\(check_PROGRAMS\\)") "TESTS =")))
(apply configure args)))
(home-page "")
(synopsis "Numerical library for C and C++")
"The GNU Scientific Library is a library for numerical analysis in C
and C++. It includes a wide range of mathematical routines, with over 1000
functions in total. Subject areas covered by the library include:
differential equations, linear algebra, Fast Fourier Transforms and random
(license license:gpl3+)))
(define-public glpk
(name "glpk")
(version "4.52.1")
(method url-fetch)
(uri (string-append "mirror://gnu/glpk/glpk-"
version ".tar.gz"))
(build-system gnu-build-system)
`(("gmp" ,gmp)))
`(#:configure-flags '("--with-gmp")))
(home-page "")
(synopsis "GNU Linear Programming Kit, supporting the MathProg language")
"GLPK is a C library for solving large-scale linear programming (LP),
mixed integer programming (MIP), and other related problems. It supports the
GNU MathProg modeling language, a subset of the AMPL language, and features a
translator for the language. In addition to the C library, a stand-alone
LP/MIP solver is included in the package.")
(license license:gpl3+)))
(define-public pspp
(name "pspp")
(version "0.8.1")
(method url-fetch)
(uri (string-append "mirror://gnu/pspp/pspp-"
version ".tar.gz"))
(patches (list (search-patch "pspp-tests.patch")))))
(build-system gnu-build-system)
`(("cairo" ,cairo)
("fontconfig" ,fontconfig)
("gettext" ,gnu-gettext)
("gsl" ,gsl)
("libxml2" ,libxml2)
("pango" ,pango)
("readline" ,readline)
("gtk" ,gtk+-2)
("gtksourceview" ,gtksourceview)
("zlib" ,zlib)))
`(("perl" ,perl)
("pkg-config" ,pkg-config)))
(home-page "")
(synopsis "Statistical analysis")
"GNU PSPP is a statistical analysis program. It can perform
descriptive statistics, T-tests, linear regression and non-parametric tests.
It features both a graphical interface as well as command-line input. PSPP is
designed to interoperate with Gnumeric, LibreOffice and OpenOffice. Data can
be imported from spreadsheets, text files and database sources and it can be
output in text, PostScript, PDF or HTML.")
(license license:gpl3+)))
(define-public lapack
(name "lapack")
(version "3.4.2")
(method url-fetch)
(uri (string-append ""
version ".tgz"))
;; Remove non-free files.
;; See <>.
'(for-each (lambda (file)
(format #t "removing '~a'~%" file)
(delete-file file))
(build-system cmake-build-system)
(home-page "")
(inputs `(("fortran" ,gfortran-4.8)
("python" ,python-2)))
`(#:modules ((guix build cmake-build-system)
(guix build utils)
(srfi srfi-1))
#:phases (alist-cons-before
'check 'patch-python
(lambda* (#:key inputs #:allow-other-keys)
(let ((python (assoc-ref inputs "python")))
(substitute* ""
(("/usr/bin/env python") python))))
(synopsis "Library for numerical linear algebra")
"LAPACK is a Fortran 90 library for solving the most commonly occurring
problems in numerical linear algebra.")
(license (license:bsd-style "file://LICENSE"
"See LICENSE in the distribution."))))