| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages perl-maths)
|
| 20 | #:use-module ((guix licenses) #:prefix license:)
|
| 21 | #:use-module (guix packages)
|
| 22 | #:use-module (guix download)
|
| 23 | #:use-module (guix git-download)
|
| 24 | #:use-module (guix gexp)
|
| 25 | #:use-module (guix utils)
|
| 26 | #:use-module (guix build-system perl)
|
| 27 | #:use-module (gnu packages)
|
| 28 | #:use-module (gnu packages compression)
|
| 29 | #:use-module (gnu packages gcc)
|
| 30 | #:use-module (gnu packages gd)
|
| 31 | #:use-module (gnu packages gl)
|
| 32 | #:use-module (gnu packages maths)
|
| 33 | #:use-module (gnu packages perl)
|
| 34 | #:use-module (gnu packages perl-check)
|
| 35 | #:use-module (gnu packages xorg))
|
| 36 |
|
| 37 | (define-public perl-math-cephes
|
| 38 | (package
|
| 39 | (name "perl-math-cephes")
|
| 40 | (version "0.5305")
|
| 41 | (source (origin
|
| 42 | (method url-fetch)
|
| 43 | (uri (string-append
|
| 44 | "mirror://cpan/authors/id/S/SH/SHLOMIF/Math-Cephes-"
|
| 45 | version ".tar.gz"))
|
| 46 | (sha256
|
| 47 | (base32
|
| 48 | "18c3xg53d1vv7hlj43601jj7ks119fm6ndpwpv94irr2905806jn"))
|
| 49 | |
| 50 | (modules '((guix build utils)))
|
| 51 | (snippet
|
| 52 | '(substitute* "libmd/Makefile.PL"
|
| 53 | (("readdir DIR") "sort readdir DIR")))))
|
| 54 | (build-system perl-build-system)
|
| 55 | (home-page "https://metacpan.org/release/Math-Cephes")
|
| 56 | (synopsis "Perl interface to the Cephes math library")
|
| 57 | (description "The Math::Cephes module provides a Perl interface to over
|
| 58 | 150 functions of the Cephes math library.")
|
| 59 | (license license:perl-license)))
|
| 60 |
|
| 61 | (define-public perl-math-matrixreal
|
| 62 | (package
|
| 63 | (name "perl-math-matrixreal")
|
| 64 | (version "2.13")
|
| 65 | (source (origin
|
| 66 | (method url-fetch)
|
| 67 | (uri (string-append
|
| 68 | "mirror://cpan/authors/id/L/LE/LETO/Math-MatrixReal-"
|
| 69 | version ".tar.gz"))
|
| 70 | (sha256
|
| 71 | (base32
|
| 72 | "1cml5wqd99hm398gl8f147ccsck9v179l7a6vqjj4kfkdnja37sg"))))
|
| 73 | (build-system perl-build-system)
|
| 74 | (native-inputs
|
| 75 | (list perl-module-build perl-test-most))
|
| 76 | (home-page "https://metacpan.org/release/Math-MatrixReal")
|
| 77 | (synopsis "Manipulate NxN matrices of real numbers")
|
| 78 | (description "This package provides the @code{Math::MatrixReal} module.
|
| 79 | It implements the data type \"matrix of real numbers\" (and consequently also
|
| 80 | \"vector of real numbers\").")
|
| 81 | (license license:perl-license)))
|
| 82 |
|
| 83 | (define-public perl-math-interpolate
|
| 84 | (package
|
| 85 | (name "perl-math-interpolate")
|
| 86 | (version "1.06")
|
| 87 | (source
|
| 88 | (origin
|
| 89 | (method url-fetch)
|
| 90 | (uri (string-append
|
| 91 | "mirror://cpan/authors/id/B/BZ/BZAJAC/Math-Interpolate-" version
|
| 92 | ".tar.gz"))
|
| 93 | (sha256
|
| 94 | (base32 "0snfrg9vk0f9bznpv274f21p65gxv08x4m1myg2l5k4yvyzjyl54"))))
|
| 95 | (build-system perl-build-system)
|
| 96 | (arguments
|
| 97 | (list
|
| 98 | #:phases
|
| 99 | #~(modify-phases %standard-phases
|
| 100 | (add-after 'unpack 'patch
|
| 101 | (lambda _
|
| 102 | |
| 103 | (substitute* "Makefile.PL"
|
| 104 | (("'MIN_PERL_VERSION'[ \t]*=>[ \t]*'5.004_01'")
|
| 105 | "'MIN_PERL_VERSION' => '5.005'")))))))
|
| 106 | (home-page "https://metacpan.org/release/Math-Interpolate")
|
| 107 | (synopsis "Interpolate the value Y from X using a list of (X, Y) pairs")
|
| 108 | (description "This packages allows you to interpolate the value Y from X
|
| 109 | using a list of (X, Y) pairs.")
|
| 110 | (license license:perl-license)))
|
| 111 |
|
| 112 | |
| 113 | (define-public perl-pdl-2.019
|
| 114 | (package
|
| 115 | (name "perl-pdl")
|
| 116 | (version "2.019")
|
| 117 | (source
|
| 118 | (origin
|
| 119 | (method url-fetch)
|
| 120 | (uri (string-append "https://www.cpan.org/modules/by-module/PDL/PDL-" version
|
| 121 | ".tar.gz"))
|
| 122 | (sha256
|
| 123 | (base32 "1zkp5pm351qjr6sb3xivpxy5vjfl72ns0hb4dx5vpm8xvgp7p92i"))
|
| 124 | (patches
|
| 125 | (search-patches "pdl-2.019-glut-bitmap-fonts.patch"))))
|
| 126 | (build-system perl-build-system)
|
| 127 | (arguments
|
| 128 | `(#:make-maker-flags
|
| 129 | |
| 130 | `("OPTIMIZE=-O2 -Wno-error=implicit-function-declaration")
|
| 131 | #:phases
|
| 132 | (modify-phases %standard-phases
|
| 133 | (add-after 'unpack 'patch-includes
|
| 134 | (lambda* (#:key inputs #:allow-other-keys)
|
| 135 | (substitute* "perldl.conf"
|
| 136 | (("WITH_BADVAL => 0") "WITH_BADVAL => 1")
|
| 137 | (("WITH_GD => undef") "WITH_GD => true")
|
| 138 | (("GD_INC => undef")
|
| 139 | (string-append "GD_INC => '" (assoc-ref inputs "gd") "/include'"))
|
| 140 | (("GD_LIB => undef")
|
| 141 | (string-append "GD_LIB => '" (assoc-ref inputs "gd") "/lib'"))
|
| 142 | (("WITH_GSL => undef") "WITH_GSL => true"))))
|
| 143 | (add-before 'check 'prepare-check
|
| 144 | (lambda _
|
| 145 | |
| 146 | (setenv "SKIP_KNOWN_PROBLEMS" "1")
|
| 147 | (setenv "HOME" "/tmp"))))))
|
| 148 | (inputs (list gd gsl mesa glu))
|
| 149 | (native-inputs (list perl-devel-checklib
|
| 150 | perl-extutils-depends
|
| 151 | perl-extutils-f77
|
| 152 | gfortran
|
| 153 | sharutils
|
| 154 | perl-file-which
|
| 155 | perl-pod-parser
|
| 156 | perl-test-deep
|
| 157 | perl-test-exception
|
| 158 | perl-test-warn))
|
| 159 | (propagated-inputs (list perl-file-map
|
| 160 | perl-file-which
|
| 161 | perl-inline
|
| 162 | perl-inline-c
|
| 163 | perl-list-moreutils
|
| 164 | perl-opengl
|
| 165 | perl-pod-parser
|
| 166 | perl-sys-sigaction
|
| 167 | perl-termreadkey))
|
| 168 | (home-page "https://metacpan.org/release/PDL")
|
| 169 | (synopsis "Perl Data Language")
|
| 170 | (description "This package provides a library and simple REPL for the
|
| 171 | Perl Data Language.")
|
| 172 | (license license:perl-license)))
|
| 173 |
|
| 174 | |
| 175 | (define-public perl-pdl
|
| 176 | (package
|
| 177 | (inherit perl-pdl-2.019)
|
| 178 | (name "perl-pdl")
|
| 179 | (version "2.100")
|
| 180 | (source
|
| 181 | (origin
|
| 182 | (method git-fetch)
|
| 183 | (uri (git-reference
|
| 184 | (url "https://github.com/PDLPorters/pdl.git")
|
| 185 | (commit version)))
|
| 186 | (file-name (git-file-name name version))
|
| 187 | (sha256
|
| 188 | (base32 "0nkvjb4l8r2l2piz0s9jifpm0kr6g7fy9krky130s82vq8bz19sc"))
|
| 189 | (patches
|
| 190 | (search-patches "pdl-2.100-reproducibility.patch"))))
|
| 191 | (build-system perl-build-system)
|
| 192 | (arguments
|
| 193 | (list
|
| 194 | #:phases
|
| 195 | #~(modify-phases %standard-phases
|
| 196 | (add-after 'unpack 'patch-includes
|
| 197 | (lambda* (#:key inputs #:allow-other-keys)
|
| 198 | (substitute* "lib/PDL/Core/Dev.pm"
|
| 199 | |
| 200 | (("utime [$]mtime - 120, [$]mtime - 120, [$]pmfile; # so is out of date")
|
| 201 | "utime $mtime - 1, $mtime - 1, $pmfile; # so is out of date")))))))
|
| 202 | (inputs (list gd gsl mesa glu))
|
| 203 | (native-inputs (list perl-capture-tiny |
| 204 | perl-devel-checklib
|
| 205 | perl-extutils-depends
|
| 206 | perl-extutils-f77
|
| 207 | gfortran
|
| 208 | perl-file-which
|
| 209 | perl-pod-parser
|
| 210 | perl-test-deep
|
| 211 | perl-test-exception
|
| 212 | perl-test-warn
|
| 213 | perl-text-balanced)) |
| 214 | (propagated-inputs (list perl-file-map
|
| 215 | perl-file-which
|
| 216 | perl-inline
|
| 217 | perl-inline-c
|
| 218 | perl-list-moreutils
|
| 219 | perl-opengl
|
| 220 | perl-pod-parser
|
| 221 | perl-sys-sigaction
|
| 222 | perl-termreadkey))
|
| 223 | (home-page "https://metacpan.org/release/PDL")
|
| 224 | (synopsis "Perl Data Language")
|
| 225 | (description "This package provides a library and simple REPL for the
|
| 226 | Perl Data Language.")
|
| 227 | (license license:perl-license)))
|
| 228 |
|
| 229 | (define-public perl-pdl-graphics-trid
|
| 230 | (package
|
| 231 | (name "perl-pdl-graphics-trid")
|
| 232 | (version "2.102")
|
| 233 | (source (origin
|
| 234 | (method git-fetch)
|
| 235 | (uri (git-reference
|
| 236 | (url "https://github.com/PDLPorters/PDL-Graphics-TriD.git")
|
| 237 | (commit version)))
|
| 238 | (file-name (git-file-name name version))
|
| 239 | (sha256
|
| 240 | (base32
|
| 241 | "0c66337l3dkw70mqgldbih1xkyg082lalmaldb9k5058hq4jhqzl"))))
|
| 242 | (build-system perl-build-system)
|
| 243 | (inputs
|
| 244 | (list mesa))
|
| 245 | (propagated-inputs
|
| 246 | (list perl-pdl))
|
| 247 | (synopsis "3D graphics in Perl Data Language")
|
| 248 | (description "This package provides modules to do 3D graphics in PDL.")
|
| 249 | (home-page "https://github.com/PDLPorters/")
|
| 250 | (license license:perl-license)))
|
| 251 |
|
| 252 | (define-public perl-pgplot
|
| 253 | (package
|
| 254 | (name "perl-pgplot")
|
| 255 | (version "2.36")
|
| 256 | (source
|
| 257 | (origin
|
| 258 | (method git-fetch)
|
| 259 | (uri (git-reference
|
| 260 | (url "https://github.com/PDLPorters/perl5-PGPLOT.git")
|
| 261 | (commit version)))
|
| 262 | (file-name (git-file-name name version))
|
| 263 | (sha256
|
| 264 | (base32 "08dx9rbidl6k1xqswk8qgm64mx61cfa359n0y5a45z22cbs8pbnh"))))
|
| 265 | (build-system perl-build-system)
|
| 266 | (arguments
|
| 267 | `(#:phases
|
| 268 | (modify-phases %standard-phases
|
| 269 | (add-after 'unpack 'setenv
|
| 270 | (lambda* (#:key inputs #:allow-other-keys)
|
| 271 | (setenv "PGPLOT_DIR" (string-append (assoc-ref inputs "giza") "/lib")))))))
|
| 272 | (inputs (list giza-1 libx11))
|
| 273 | (native-inputs (list perl-devel-checklib perl-extutils-f77 gfortran perl-pdl))
|
| 274 | (home-page "https://metacpan.org/release/PGPLOT")
|
| 275 | (synopsis "Scientific plotting library (using giza)")
|
| 276 | (description "This package provides PGPLOT bindings for Perl. It uses
|
| 277 | giza instead of PGPLOT for the implementation, though.")
|
| 278 | |
| 279 | (license license:gpl2+)))
|