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.
 
 
 
 
 
 

156 lines
5.9 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
  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. (define-module (gnu packages maths)
  19. #:use-module (gnu packages)
  20. #:use-module ((guix licenses)
  21. #:renamer (symbol-prefix-proc 'license:))
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix build-system gnu)
  25. #:use-module (gnu packages compression)
  26. #:use-module ((gnu packages gettext)
  27. #:renamer (symbol-prefix-proc 'gnu:))
  28. #:use-module (gnu packages multiprecision)
  29. #:use-module (gnu packages perl)
  30. #:use-module (gnu packages pkg-config)
  31. #:use-module (gnu packages readline)
  32. #:use-module (gnu packages xml))
  33. (define-public units
  34. (package
  35. (name "units")
  36. (version "2.02")
  37. (source (origin
  38. (method url-fetch)
  39. (uri (string-append "mirror://gnu/units/units-" version
  40. ".tar.gz"))
  41. (sha256 (base32
  42. "16jfji9g1zc99agd5dcinajinhcxr4dgq2lrbc9md69ir5qgld1b"))))
  43. (build-system gnu-build-system)
  44. (synopsis "Conversion between thousands of scales")
  45. (description
  46. "Units is a program for converting measured quantities between units of
  47. measure. It can handle scale changes through adaptive usage of standard
  48. scale prefixes (i.e. micro-, kilo-, etc.). It can also handle nonlinear
  49. conversions such as Fahrenheit to Celcius. Its interpreter is powerful
  50. enough to be used effectively as a scientific calculator.")
  51. (license license:gpl3+)
  52. (home-page "http://www.gnu.org/software/units/")))
  53. (define-public gsl
  54. (package
  55. (name "gsl")
  56. (version "1.16")
  57. (source
  58. (origin
  59. (method url-fetch)
  60. (uri (string-append "mirror://gnu/gsl/gsl-"
  61. version ".tar.gz"))
  62. (sha256
  63. (base32
  64. "0lrgipi0z6559jqh82yx8n4xgnxkhzj46v96dl77hahdp58jzg3k"))))
  65. (build-system gnu-build-system)
  66. (arguments
  67. `(#:parallel-tests? #f
  68. #:phases
  69. (alist-replace
  70. 'configure
  71. (lambda* (#:key target system outputs #:allow-other-keys #:rest args)
  72. (let ((configure (assoc-ref %standard-phases 'configure)))
  73. ;; disable numerically unstable test on i686, see thread at
  74. ;; http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
  75. (if (string=? (or target system) "i686-linux")
  76. (substitute* "ode-initval2/Makefile.in"
  77. (("TESTS = \\$\\(check_PROGRAMS\\)") "TESTS =")))
  78. (apply configure args)))
  79. %standard-phases)))
  80. (home-page "http://www.gnu.org/software/gsl/")
  81. (synopsis "Numerical library for C and C++")
  82. (description
  83. "The GNU Scientific Library is a library for numerical analysis in C
  84. and C++. It includes a wide range of mathematical routines, with over 1000
  85. functions in total. Subject areas covered by the library include:
  86. differential equations, linear algebra, Fast Fourier Transforms and random
  87. numbers.")
  88. (license license:gpl3+)))
  89. (define-public glpk
  90. (package
  91. (name "glpk")
  92. (version "4.52.1")
  93. (source
  94. (origin
  95. (method url-fetch)
  96. (uri (string-append "mirror://gnu/glpk/glpk-"
  97. version ".tar.gz"))
  98. (sha256
  99. (base32
  100. "0nz9ngmx23c8gbjr8l8ygnfaanxj2mwbl8awpg630bgrkxdnhc9j"))))
  101. (build-system gnu-build-system)
  102. (inputs
  103. `(("gmp" ,gmp)))
  104. (arguments
  105. `(#:configure-flags '("--with-gmp")))
  106. (home-page "http://www.gnu.org/software/glpk/")
  107. (synopsis "NU Linear Programming Kit, supporting the MathProg language")
  108. (description
  109. "GLPK is a C library for solving large-scale linear programming (LP),
  110. mixed integer programming (MIP), and other related problems. It supports the
  111. GNU MathProg modeling language, a subset of the AMPL language, and features a
  112. translator for the language. In addition to the C library, a stand-alone
  113. LP/MIP solver is included in the package.")
  114. (license license:gpl3+)))
  115. (define-public pspp
  116. (package
  117. (name "pspp")
  118. (version "0.8.1")
  119. (source
  120. (origin
  121. (method url-fetch)
  122. (uri (string-append "mirror://gnu/pspp/pspp-"
  123. version ".tar.gz"))
  124. (sha256
  125. (base32
  126. "0qhxsdbwxd3cn1shc13wxvx2lg32lp4z6sz24kv3jz7p5xfi8j7x"))))
  127. (build-system gnu-build-system)
  128. (inputs
  129. `(("gettext" ,gnu:gettext)
  130. ("gsl" ,gsl)
  131. ("libxml2" ,libxml2)
  132. ("readline" ,readline)
  133. ("zlib" ,zlib)))
  134. (native-inputs
  135. `(("perl" ,perl)
  136. ("pkg-config" ,pkg-config)))
  137. (arguments
  138. `(#:configure-flags
  139. `("--without-cairo" ; FIXME: tests currently fail for lack of font
  140. "--without-gui"))) ; FIXME: package missing dependencies
  141. (home-page "http://www.gnu.org/software/pspp/")
  142. (synopsis "Statistical analysis")
  143. (description
  144. "PSPP is a statistical analysis program. It can perform descriptive
  145. statistics, T-tests, linear regression and non-parametric tests. It features
  146. both a graphical interface as well as command-line input. PSPP is designed to
  147. interoperate with Gnumeric, LibreOffice and OpenOffice. Data can be imported
  148. from spreadsheets, text files and database sources and it can be output in
  149. text, Postscript, PDF or HTML.")
  150. (license license:gpl3+)))