Commit | Line | Data |
---|---|---|
adba6466 AE |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2019 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 | ||
19 | (define-module (gnu packages sagemath) | |
20 | #:use-module ((guix licenses) #:prefix license:) | |
20caeea4 | 21 | #:use-module (guix build-system gnu) |
adba6466 | 22 | #:use-module (guix build-system python) |
972ef8f5 AE |
23 | #:use-module (guix download) |
24 | #:use-module (guix git-download) | |
25 | #:use-module (guix packages) | |
9fafb0d2 | 26 | #:use-module (guix utils) |
adba6466 | 27 | #:use-module (gnu packages algebra) |
972ef8f5 | 28 | #:use-module (gnu packages autotools) |
4c32f116 | 29 | #:use-module (gnu packages bdw-gc) |
5e388a6e | 30 | #:use-module (gnu packages compression) |
adba6466 AE |
31 | #:use-module (gnu packages multiprecision) |
32 | #:use-module (gnu packages python) | |
33 | #:use-module (gnu packages python-xyz)) | |
34 | ||
35 | ||
36 | (define-public python-cypari2 | |
ff33c38c AE |
37 | (package |
38 | (name "python-cypari2") | |
1e1a65a6 | 39 | (version "2.1.1") |
ff33c38c | 40 | (source |
adba6466 AE |
41 | (origin |
42 | (method url-fetch) | |
43 | (uri (pypi-uri "cypari2" version)) | |
44 | (sha256 | |
ff33c38c | 45 | (base32 |
1e1a65a6 | 46 | "1nwkzgqvbw6361x0rpggy1q5nx663fswhpvg8md6xhqyfwpgc7nz")))) |
ff33c38c AE |
47 | (build-system python-build-system) |
48 | (native-inputs | |
adba6466 | 49 | `(("python-cython" ,python-cython))) |
ff33c38c | 50 | (propagated-inputs |
adba6466 | 51 | `(("python-cysignals" ,python-cysignals))) |
ff33c38c | 52 | (inputs |
adba6466 AE |
53 | `(("gmp" ,gmp) |
54 | ("pari-gp", pari-gp))) | |
ff33c38c AE |
55 | (home-page "https://cypari2.readthedocs.io/") |
56 | (synopsis | |
adba6466 | 57 | "Python interface to the number theory library libpari") |
ff33c38c | 58 | (description |
adba6466 AE |
59 | "Cypari2 provides a Python interface to the number theory library |
60 | PARI/GP. It has been spun off from the SageMath mathematics software system, | |
61 | but it can be used independently.") | |
ff33c38c | 62 | (license license:gpl2+))) |
adba6466 AE |
63 | |
64 | (define-public python2-cypari2 | |
65 | (package-with-python2 python-cypari2)) | |
66 | ||
5e388a6e AE |
67 | ;; The stable version of the following package is not young enough to be |
68 | ;; used with Sage, since it does not support cython. One would need to | |
69 | ;; use an alpha release. On the other hand, Sage can be built without it. | |
70 | (define-public python-gmpy2 | |
71 | (package | |
af5ead8b MB |
72 | (name "python-gmpy2") |
73 | (version "2.0.8") | |
74 | (source (origin | |
75 | (method url-fetch) | |
76 | (uri (pypi-uri "gmpy2" version ".zip")) | |
77 | (sha256 | |
78 | (base32 | |
79 | "0grx6zmi99iaslm07w6c2aqpnmbkgrxcqjrqpfq223xri0r3w8yx")))) | |
80 | (build-system python-build-system) | |
81 | (native-inputs | |
82 | `(("unzip" ,unzip))) | |
83 | (inputs | |
84 | `(("gmp" ,gmp) | |
85 | ("mpfr" ,mpfr) | |
86 | ("mpc" ,mpc))) | |
87 | (home-page "https://github.com/aleaxit/gmpy") | |
88 | (synopsis | |
5e388a6e | 89 | "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x") |
af5ead8b | 90 | (description |
ec6f1a0e AE |
91 | "This package provides a Python interface to the GNU multiprecision |
92 | libraries GMO, MPFR and MPC.") | |
af5ead8b | 93 | (license license:lgpl3+))) |
5e388a6e AE |
94 | |
95 | (define-public python2-gmpy2 | |
96 | (package-with-python2 python-gmpy2)) | |
20caeea4 AE |
97 | |
98 | (define-public cliquer | |
99 | (package | |
100 | (name "cliquer") | |
101 | (version "1.21") | |
102 | ;; The original source package is available from the home page and | |
103 | ;; has not seen any release since 2010; it comes with only a Makefile | |
104 | ;; without an "install" target. Instead, there is an autotoolized | |
105 | ;; tarball available from the Sage project. | |
106 | (source | |
107 | (origin | |
108 | (method url-fetch) | |
109 | (uri "http://users.ox.ac.uk/~coml0531/sage/cliquer-1.21.tar.gz") | |
110 | (sha256 | |
111 | (base32 | |
112 | "1hdzrmrx0nvvj8kbwxrs8swqgkd284khzl623jizixcv28xb77aq")))) | |
113 | (build-system gnu-build-system) | |
114 | (synopsis "C routines for finding cliques in weighted graphs") | |
115 | (description "Cliquer is a set of reentrant C routines for finding | |
116 | cliques in a weighted or unweighted graph. It uses an exact | |
117 | branch-and-bound algorithm. It can search for maximum or maximum-weight | |
118 | cliques or cliques with size or weight within a given range, restrict the | |
119 | search to maximal cliques, store cliques in memory and call a user-defined | |
120 | function for every found clique.") | |
121 | (license license:gpl2+) | |
122 | (home-page "https://users.aalto.fi/~pat/cliquer.html"))) | |
972ef8f5 AE |
123 | |
124 | (define-public libbraiding | |
125 | (package | |
126 | (name "libbraiding") | |
127 | (version "1.0") | |
128 | (source | |
129 | (origin | |
130 | (method git-fetch) | |
131 | (uri (git-reference | |
132 | (url (string-append "https://github.com/miguelmarco/" | |
133 | name)) | |
134 | (commit version))) | |
135 | (file-name (git-file-name name version)) | |
136 | (sha256 | |
137 | (base32 | |
138 | "0l68rikfr7k2l547gb3pp3g8cj5zzxwipm79xrb5r8ffj466ydxg")))) | |
139 | (build-system gnu-build-system) | |
140 | (native-inputs | |
141 | `(("autoconf" ,autoconf) | |
142 | ("automake" ,automake) | |
143 | ("libtool" ,libtool))) | |
144 | (synopsis "Computations with braid groups") | |
145 | (description "libbraiding performs computations with braid groups, | |
146 | in particular it computes normal forms of group elements.") | |
147 | (license license:gpl2+) | |
148 | (home-page "https://github.com/miguelmarco/libbraiding"))) | |
4c32f116 AE |
149 | |
150 | (define-public libhomfly | |
151 | (package | |
152 | (name "libhomfly") | |
153 | (version "1.02r6") | |
154 | (source | |
155 | (origin | |
156 | (method git-fetch) | |
157 | (uri (git-reference | |
158 | (url (string-append "https://github.com/miguelmarco/" | |
159 | name)) | |
160 | (commit version))) | |
161 | (file-name (git-file-name name version)) | |
162 | (sha256 | |
163 | (base32 | |
164 | "0sv3cwrf9v9sb5a8wbhjmarxvya13ma3j8y8592f9ymxlk5y0ldk")))) | |
165 | (build-system gnu-build-system) | |
166 | (native-inputs | |
167 | `(("autoconf" ,autoconf) | |
168 | ("automake" ,automake) | |
169 | ("libtool" ,libtool))) | |
170 | (inputs | |
171 | `(("libgc" ,libgc))) | |
172 | (synopsis "Computation of homfly polynomials of links") | |
173 | (description "libhomfly computes homfly polynomials of links, | |
174 | represented as strings.") | |
175 | (license license:public-domain) | |
176 | (home-page "https://github.com/miguelmarco/libhomfly"))) | |
80a70da7 AE |
177 | |
178 | ;; The following three packages from the Linbox group are needed in | |
179 | ;; an outdated version for Sage. | |
180 | ||
181 | (define-public givaro-4.0.4 | |
182 | (package (inherit givaro) | |
183 | (name "givaro") | |
184 | (version "4.0.4") | |
185 | (source (origin | |
186 | (method git-fetch) | |
187 | (uri (git-reference | |
188 | (url "https://github.com/linbox-team/givaro") | |
189 | (commit (string-append "v" version)))) | |
190 | (file-name (git-file-name name version)) | |
191 | (sha256 | |
192 | (base32 | |
193 | "199p8wyj5i63jbnk7j8qbdbfp5rm2lpmcxyk3mdjy9bz7ygx3hhy")))))) | |
9fafb0d2 AE |
194 | |
195 | (define-public fflas-ffpack-2.3.2 | |
196 | (package (inherit fflas-ffpack) | |
197 | (name "fflas-ffpack") | |
198 | (version "2.3.2") | |
199 | (source (origin | |
200 | (method git-fetch) | |
201 | (uri (git-reference | |
202 | (url "https://github.com/linbox-team/fflas-ffpack") | |
203 | (commit (string-append "v" version)))) | |
204 | (file-name (git-file-name name version)) | |
205 | (sha256 | |
206 | (base32 | |
207 | "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl")))) | |
208 | (propagated-inputs | |
209 | `(("givaro" ,givaro-4.0.4))) | |
210 | ;; A test fails, but since all tests pass in the latest version, | |
211 | ;; there is not much point in investigating. | |
212 | (arguments | |
213 | (substitute-keyword-arguments (package-arguments fflas-ffpack) | |
214 | ((#:tests? _ #f) #f))))) | |
e27ae2db AE |
215 | |
216 | (define-public linbox-1.5.2 | |
217 | (package (inherit linbox) | |
218 | (version "1.5.2") | |
219 | (name "linbox") | |
220 | (source (origin | |
221 | (method git-fetch) | |
222 | (uri (git-reference | |
223 | (url "https://github.com/linbox-team/linbox") | |
224 | (commit (string-append "v" version)))) | |
225 | (file-name (git-file-name name version)) | |
226 | (sha256 | |
227 | (base32 | |
228 | "1wfivlwp30mzdy1697w7rzb8caajim50mc8h27k82yipn2qc5n4i")))) | |
229 | (inputs | |
230 | `(("fflas-ffpack" ,fflas-ffpack-2.3.2))))) |