| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 |
|
| 25 | (define-module (gnu packages plotutils)
|
| 26 | #:use-module ((guix licenses) #:prefix license:)
|
| 27 | #:use-module ((guix utils) #:select (target-x86-32?))
|
| 28 | #:use-module (guix build-system cmake)
|
| 29 | #:use-module (guix build-system gnu)
|
| 30 | #:use-module (guix build-system ruby)
|
| 31 | #:use-module (guix download)
|
| 32 | #:use-module (guix gexp)
|
| 33 | #:use-module (guix git-download)
|
| 34 | #:use-module (guix packages)
|
| 35 | #:use-module (gnu packages)
|
| 36 | #:use-module (gnu packages algebra)
|
| 37 | #:use-module (gnu packages autotools)
|
| 38 | #:use-module (gnu packages bash)
|
| 39 | #:use-module (gnu packages bdw-gc)
|
| 40 | #:use-module (gnu packages bison)
|
| 41 | #:use-module (gnu packages boost)
|
| 42 | #:use-module (gnu packages cmake)
|
| 43 | #:use-module (gnu packages compression)
|
| 44 | #:use-module (gnu packages emacs)
|
| 45 | #:use-module (gnu packages flex)
|
| 46 | #:use-module (gnu packages ghostscript)
|
| 47 | #:use-module (gnu packages gl)
|
| 48 | #:use-module (gnu packages gtk)
|
| 49 | #:use-module (gnu packages guile)
|
| 50 | #:use-module (gnu packages image)
|
| 51 | #:use-module (gnu packages maths)
|
| 52 | #:use-module (gnu packages onc-rpc)
|
| 53 | #:use-module (gnu packages perl)
|
| 54 | #:use-module (gnu packages pkg-config)
|
| 55 | #:use-module (gnu packages python)
|
| 56 | #:use-module (gnu packages python-xyz)
|
| 57 | #:use-module (gnu packages qt)
|
| 58 | #:use-module (gnu packages readline)
|
| 59 | #:use-module (gnu packages ruby-check)
|
| 60 | #:use-module (gnu packages ruby-xyz)
|
| 61 | #:use-module (gnu packages statistics)
|
| 62 | #:use-module (gnu packages tex)
|
| 63 | #:use-module (gnu packages texinfo)
|
| 64 | #:use-module (gnu packages web)
|
| 65 | #:use-module (gnu packages wxwidgets)
|
| 66 | #:use-module (gnu packages xorg))
|
| 67 |
|
| 68 | (define-public asymptote
|
| 69 | (package
|
| 70 | (name "asymptote")
|
| 71 | (version "3.05")
|
| 72 | (source
|
| 73 | (origin
|
| 74 | (method url-fetch)
|
| 75 | (uri (string-append "mirror://sourceforge/asymptote/"
|
| 76 | version "/asymptote-" version ".src.tgz"))
|
| 77 | (sha256
|
| 78 | (base32 "11wsqvsdn58h8ybd2r5nysr8hfhwz0w4dzzgwib9m1nx7c56vh9m"))
|
| 79 | (modules '((guix build utils)))
|
| 80 | (snippet
|
| 81 | |
| 82 | #~(begin
|
| 83 | (delete-file-recursively "LspCpp/third_party/rapidjson")))))
|
| 84 | (build-system gnu-build-system)
|
| 85 | |
| 86 | |
| 87 | |
| 88 | (native-inputs
|
| 89 | (list autoconf-2.71
|
| 90 | automake
|
| 91 | bison
|
| 92 | boost
|
| 93 | cmake-minimal
|
| 94 | emacs-minimal
|
| 95 | flex
|
| 96 | ghostscript |
| 97 | perl
|
| 98 | pkg-config
|
| 99 | rapidjson
|
| 100 | texinfo |
| 101 | (texlive-local-tree
|
| 102 | (list texlive-dvisvgm
|
| 103 | texlive-epsf
|
| 104 | texlive-etoolbox
|
| 105 | texlive-hypdoc
|
| 106 | texlive-infwarerr
|
| 107 | texlive-kvdefinekeys
|
| 108 | texlive-kvoptions
|
| 109 | texlive-media9
|
| 110 | texlive-ocgx2
|
| 111 | texlive-parskip
|
| 112 | texlive-pdftexcmds
|
| 113 | texlive-texinfo
|
| 114 | texlive-type1cm))))
|
| 115 | (inputs
|
| 116 | (list bash-minimal
|
| 117 | eigen
|
| 118 | fftw
|
| 119 | freeglut
|
| 120 | glew
|
| 121 | glm
|
| 122 | gsl
|
| 123 | libgc
|
| 124 | libtirpc
|
| 125 | python
|
| 126 | python-cson
|
| 127 | python-numpy
|
| 128 | python-pyqt
|
| 129 | readline
|
| 130 | zlib))
|
| 131 | (arguments
|
| 132 | (list
|
| 133 | #:modules '((guix build emacs-utils)
|
| 134 | (guix build gnu-build-system)
|
| 135 | (guix build utils)
|
| 136 | (srfi srfi-26))
|
| 137 | #:imported-modules `(,@%default-gnu-imported-modules
|
| 138 | (guix build emacs-utils))
|
| 139 | #:configure-flags
|
| 140 | #~(list (string-append "--enable-gc=" #$(this-package-input "libgc"))
|
| 141 | (string-append "--with-latex=" #$output "/share/texmf/tex/latex")
|
| 142 | (string-append "--with-context="
|
| 143 | #$output
|
| 144 | "/share/texmf/tex/context/third"))
|
| 145 | #:phases
|
| 146 | #~(modify-phases %standard-phases
|
| 147 | (add-after 'unpack 'locate-tirpc
|
| 148 | (lambda* (#:key inputs #:allow-other-keys)
|
| 149 | (substitute* (list "configure.ac")
|
| 150 | (("GCLIB=\".*/libgc.a\"") "GCLIB=\"-lgc\"")
|
| 151 | (("/usr/include/tirpc")
|
| 152 | (search-input-directory inputs "include/tirpc")))))
|
| 153 | (add-after 'unpack 'unbundle-rapidjson
|
| 154 | (lambda* (#:key inputs #:allow-other-keys)
|
| 155 | (substitute* (list "Makefile.in")
|
| 156 | (("\\$\\(CMAKE\\)" all)
|
| 157 | (string-append all " -DUSE_SYSTEM_RAPIDJSON=ON")))))
|
| 158 | (replace 'bootstrap
|
| 159 | (lambda _
|
| 160 | (invoke "autoreconf" "-vfi")))
|
| 161 | (add-after 'unpack 'move-info-location
|
| 162 | |
| 163 | |
| 164 | |
| 165 | (lambda _
|
| 166 | (substitute* "doc/png/Makefile.in"
|
| 167 | (("(\\$\\(infodir\\))/asymptote" _ infodir) infodir))
|
| 168 | (substitute* "doc/asymptote.texi"
|
| 169 | (("asymptote/asymptote") "asymptote"))))
|
| 170 | (add-before 'build 'patch-pdf-viewer
|
| 171 | (lambda _
|
| 172 | |
| 173 | (substitute* "settings.cc"
|
| 174 | (("defaultPDFViewer=\"acroread\"")
|
| 175 | "defaultPDFViewer=\"gv\""))))
|
| 176 | (add-before 'build 'setenv
|
| 177 | (lambda _
|
| 178 | (setenv "TEXMFVAR" "/tmp"))) |
| 179 | (add-before 'check 'set-HOME
|
| 180 | |
| 181 | |
| 182 | (lambda _
|
| 183 | (setenv "HOME" "/tmp")))
|
| 184 | (add-after 'install 'install-Emacs-data
|
| 185 | (lambda _
|
| 186 | |
| 187 | (let ((lisp-dir
|
| 188 | (string-append #$output "/share/emacs/site-lisp")))
|
| 189 | (for-each (cut install-file <> lisp-dir)
|
| 190 | (find-files "." "\\.el$"))
|
| 191 | (emacs-generate-autoloads #$name lisp-dir))))
|
| 192 | (add-after 'install-Emacs-data 'wrap-python-script
|
| 193 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 194 | |
| 195 | (let ((path (getenv "GUIX_PYTHONPATH")))
|
| 196 | (wrap-program
|
| 197 | (string-append #$output "/share/asymptote/GUI/xasy.py")
|
| 198 | `("GUIX_PYTHONPATH" ":" prefix (,path)))))))))
|
| 199 | (home-page "https://asymptote.sourceforge.io")
|
| 200 | (synopsis "Script-based vector graphics language")
|
| 201 | (description
|
| 202 | "Asymptote is a powerful descriptive vector graphics language for
|
| 203 | technical drawing, inspired by MetaPost but with an improved C++-like syntax.
|
| 204 | Asymptote provides for figures the same high-quality level of typesetting that
|
| 205 | LaTeX does for scientific text.")
|
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | (license license:lgpl3+)))
|
| 211 |
|
| 212 | (define-public guile-charting
|
| 213 | |
| 214 | |
| 215 | (let ((commit "75f755b691a9f712f3b956657d01805d6a8a1b98")
|
| 216 | (revision "1"))
|
| 217 | (package
|
| 218 | (name "guile-charting")
|
| 219 | (version (git-version "0.2.0" revision commit))
|
| 220 | (source (origin
|
| 221 | (method git-fetch)
|
| 222 | (uri (git-reference
|
| 223 | (url "https://gitlab.com/wingo/guile-charting")
|
| 224 | (commit commit)))
|
| 225 | (file-name (git-file-name name version))
|
| 226 | (sha256
|
| 227 | (base32
|
| 228 | "03049g7wnpyfi0r36ij4a46kc9l45jbanx02iklkjwav2n6jqnnk"))))
|
| 229 | (build-system gnu-build-system)
|
| 230 | (native-inputs
|
| 231 | (list autoconf automake texinfo pkg-config))
|
| 232 | (inputs (list guile-3.0))
|
| 233 | (propagated-inputs (list guile-cairo))
|
| 234 | (home-page "https://wingolog.org/projects/guile-charting/")
|
| 235 | (synopsis "Create charts and graphs in Guile")
|
| 236 | (description
|
| 237 | "Guile-Charting is a Guile Scheme library to create bar charts and graphs
|
| 238 | using the Cairo drawing library.")
|
| 239 | (license license:lgpl2.1+))))
|
| 240 |
|
| 241 | (define-public guile-plotutils
|
| 242 | (package
|
| 243 | (name "guile-plotutils")
|
| 244 | (version "1.0.1")
|
| 245 | (source (origin
|
| 246 | (method url-fetch)
|
| 247 | (uri (list (string-append "https://lonelycactus.com/tarball/"
|
| 248 | "guile_plotutils-" version ".tar.gz")
|
| 249 | (string-append
|
| 250 | "https://github.com/spk121/guile-plotutils/releases/download/v"
|
| 251 | version "/guile_plotutils-" version
|
| 252 | ".tar.gz")))
|
| 253 | (sha256
|
| 254 | (base32
|
| 255 | "0r245z75cdzgzi57fpz84mnyrjq44793zzaaxxrszyxm1d06hc6r"))))
|
| 256 | (build-system gnu-build-system)
|
| 257 | (arguments
|
| 258 | `(#:imported-modules ((guix build guile-build-system)
|
| 259 | ,@%default-gnu-imported-modules)
|
| 260 | #:modules (((guix build guile-build-system)
|
| 261 | #:select (target-guile-effective-version))
|
| 262 | (guix build gnu-build-system)
|
| 263 | (guix build utils))
|
| 264 | #:phases
|
| 265 | (modify-phases %standard-phases
|
| 266 | (add-before 'install 'set-library-file-name
|
| 267 | (lambda* (#:key outputs #:allow-other-keys)
|
| 268 | (let ((out (assoc-ref outputs "out"))
|
| 269 | (version (target-guile-effective-version)))
|
| 270 | |
| 271 | (invoke "make" "install-guileextensionLTLIBRARIES")
|
| 272 |
|
| 273 | |
| 274 | (substitute* '("module/plotutils/graph.scm"
|
| 275 | "module/plotutils/plot.scm")
|
| 276 | (("\"libguile-plotutils\"")
|
| 277 | (string-append "\"" out "/lib/guile/" version
|
| 278 | "/extensions/libguile-plotutils\"")))))))))
|
| 279 | (native-inputs (list pkg-config texinfo))
|
| 280 | (inputs (list plotutils guile-3.0 zlib))
|
| 281 | (home-page "https://lonelycactus.com/guile-plotutils.html")
|
| 282 | (synopsis "Guile bindings to the GNU Plotutils plotting libraries")
|
| 283 | (description
|
| 284 | "Guile-Plotutils is a Guile binding to the venerable GNU Plotutils
|
| 285 | plotting and graphing library. If you want to make graphs that look like you
|
| 286 | went to university in the 1990s, this is the library for you.")
|
| 287 | (license license:gpl3+)))
|
| 288 |
|
| 289 | (define-public guile2.2-charting
|
| 290 | (package
|
| 291 | (inherit guile-charting)
|
| 292 | (name "guile2.2-charting")
|
| 293 | (inputs (list guile-2.2))
|
| 294 | (propagated-inputs (list guile2.2-cairo))))
|
| 295 |
|
| 296 | (define-public ploticus
|
| 297 | (package
|
| 298 | (name "ploticus")
|
| 299 | (version "2.42")
|
| 300 | (source (origin
|
| 301 | (method url-fetch)
|
| 302 | (uri (string-append "mirror://sourceforge/ploticus/ploticus/"
|
| 303 | version "/ploticus242_src.tar.gz"))
|
| 304 | (sha256
|
| 305 | (base32
|
| 306 | "1c70cvfvgjh83hj1x21130wb9qfr2rc0x47cxy9kl805yjwy8a9z"))
|
| 307 | (modules '((guix build utils)))
|
| 308 | (patches (search-patches "ploticus-pointer-types.patch"))
|
| 309 | (snippet
|
| 310 | |
| 311 | #~(begin
|
| 312 | (substitute* "src/Makefile"
|
| 313 | (("INSTALLBIN =.*$")
|
| 314 | (string-append "INSTALLBIN = $(out)/bin")))))))
|
| 315 | (build-system gnu-build-system)
|
| 316 | (arguments
|
| 317 | (list
|
| 318 | #:tests? #f |
| 319 | #:phases
|
| 320 | #~(modify-phases %standard-phases
|
| 321 | (replace 'configure (lambda _ (chdir "src")))
|
| 322 | (add-before 'install 'make-target-directories
|
| 323 | (lambda _
|
| 324 | (mkdir-p (string-append #$output "/bin"))))
|
| 325 | (add-after 'install 'install-prefabs
|
| 326 | (lambda _
|
| 327 | (let* ((out #$output)
|
| 328 | (dir (string-append out "/share/ploticus/prefabs"))
|
| 329 | (bin (string-append out "/bin")))
|
| 330 | (mkdir-p dir)
|
| 331 | |
| 332 | (for-each
|
| 333 | (lambda (file)
|
| 334 | (let ((target (string-append dir "/" (basename file))))
|
| 335 | (copy-file file target)))
|
| 336 | (find-files "../prefabs" "."))
|
| 337 | |
| 338 | (wrap-program (string-append bin "/pl")
|
| 339 | `("PLOTICUS_PREFABS" ":" = (,dir)))))))))
|
| 340 | (inputs (list bash-minimal libpng libx11 zlib))
|
| 341 | (home-page "https://ploticus.sourceforge.net/")
|
| 342 | (synopsis "Command-line tool for producing plots and charts")
|
| 343 | (description
|
| 344 | "Ploticus is a non-interactive software package for producing plots,
|
| 345 | charts, and graphics from data. Ploticus is good for automated or
|
| 346 | just-in-time graph generation, handles date and time data nicely, and has
|
| 347 | basic statistical capabilities. It allows significant user control over
|
| 348 | colors, styles, options and details.")
|
| 349 | (license license:gpl2+)))
|
| 350 |
|
| 351 | (define-public plotutils
|
| 352 | (package
|
| 353 | (name "plotutils")
|
| 354 | (version "2.6")
|
| 355 | (source (origin
|
| 356 | (method url-fetch)
|
| 357 | (uri (string-append "mirror://gnu/plotutils/plotutils-"
|
| 358 | version ".tar.gz"))
|
| 359 | (sha256
|
| 360 | (base32
|
| 361 | "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg"))
|
| 362 | (modules '((guix build utils)))
|
| 363 | (snippet
|
| 364 | |
| 365 | |
| 366 | |
| 367 | |
| 368 | '(begin
|
| 369 | (substitute* "configure"
|
| 370 | (("-lXaw")
|
| 371 | "-lXaw7"))
|
| 372 | |
| 373 | |
| 374 | |
| 375 | (substitute* "libplot/z_write.c"
|
| 376 | (("png_ptr->jmpbuf")
|
| 377 | "png_jmpbuf (png_ptr)"))
|
| 378 | #t))
|
| 379 | (patches
|
| 380 | |
| 381 | |
| 382 | |
| 383 | (search-patches "plotutils-spline-test.patch"))))
|
| 384 | (build-system gnu-build-system)
|
| 385 | (arguments
|
| 386 | (list #:configure-flags
|
| 387 | #~(list "--enable-libplotter"
|
| 388 |
|
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | #$@(if (target-x86-32?)
|
| 394 | #~("CFLAGS=-g -O2 -fexcess-precision=standard")
|
| 395 | #~()))
|
| 396 |
|
| 397 | #:phases
|
| 398 | (if (target-x86-32?)
|
| 399 | #~(modify-phases %standard-phases
|
| 400 | (add-before 'check 'skip-sloppy-test
|
| 401 | (lambda _
|
| 402 | |
| 403 | |
| 404 | (substitute* "test/plot2svg.test"
|
| 405 | (("^exit .*") "exit 77")))))
|
| 406 | #~%standard-phases)))
|
| 407 | (inputs (list libpng libx11 libxt libxaw))
|
| 408 | (home-page "https://www.gnu.org/software/plotutils/")
|
| 409 | (synopsis "Plotting utilities and library")
|
| 410 | (description
|
| 411 | "GNU Plotutils is a package for plotting and working with 2D graphics.
|
| 412 | It includes the C library @code{libplot} and the C++ @code{libplotter} library
|
| 413 | for exporting 2D vector graphics in many file formats. It also has support
|
| 414 | for 2D vector graphics animations. The package also contains command-line
|
| 415 | programs for plotting scientific data.")
|
| 416 | (license license:gpl2+)))
|
| 417 |
|
| 418 | (define-public plplot
|
| 419 | (package
|
| 420 | (name "plplot")
|
| 421 | (version "5.15.0")
|
| 422 | (source (origin
|
| 423 | (method url-fetch)
|
| 424 | (uri (string-append "mirror://sourceforge/plplot/plplot/"
|
| 425 | version "%20Source/plplot-" version
|
| 426 | ".tar.gz"))
|
| 427 | (sha256
|
| 428 | (base32
|
| 429 | "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr"))
|
| 430 | (modules '((guix build utils)))
|
| 431 | (snippet #~(begin (delete-file-recursively "www")
|
| 432 | (substitute* "CMakeLists.txt"
|
| 433 | (("add_subdirectory\\(www\\)") ""))))))
|
| 434 | (build-system cmake-build-system)
|
| 435 | |
| 436 | |
| 437 | |
| 438 | (arguments
|
| 439 | (list
|
| 440 | #:configure-flags
|
| 441 | #~(list (string-append "-DLIB_DIR=" #$output "/lib")
|
| 442 | "-DBUILD_TEST=TRUE"
|
| 443 | "-DENABLE_wxwidgets=TRUE")))
|
| 444 | (native-inputs (list pkg-config))
|
| 445 | (inputs (list wxwidgets))
|
| 446 | (home-page "http://plplot.org/") |
| 447 | (synopsis "Scientific plotting library with Unicode support")
|
| 448 | (description
|
| 449 | "PLplot is a software package for creating scientific plots which core
|
| 450 | library can be used to create standard x-y plots, semi-log plots, log-log
|
| 451 | plots, contour plots, 3D surface plots, mesh plots, bar charts and pie charts.
|
| 452 | Multiple graphs (of the same or different sizes) may be placed on a single
|
| 453 | page, and multiple pages are allowed for those device formats that support
|
| 454 | them.
|
| 455 |
|
| 456 | PLplot has support for plot symbols and text specified by the user in the
|
| 457 | UTF-8 encoding of Unicode. This means for our many Unicode-aware devices that
|
| 458 | plot symbols and text are only limited by the collection of glyphs normally
|
| 459 | available via installed system fonts. Furthermore, a large subset of our
|
| 460 | Unicode-aware devices also support complex text layout (CTL) languages such as
|
| 461 | Arabic, Hebrew, and Indic and Indic-derived CTL scripts such as Devanagari,
|
| 462 | Thai, Lao, and Tibetan. Thus, for these PLplot devices essentially any
|
| 463 | language that is supported by Unicode and installed system fonts can be used
|
| 464 | to label plots.")
|
| 465 | (license (list license:lgpl2.0
|
| 466 | license:gpl2+ |
| 467 | license:bsd-2 |
| 468 | license:ogl-psi1.0 |
| 469 | license:cc-by-sa3.0 |
| 470 | license:expat)))) |
| 471 |
|
| 472 | (define-public ruby-unicode-plot
|
| 473 | (package
|
| 474 | (name "ruby-unicode-plot")
|
| 475 | (version "0.0.5")
|
| 476 | |
| 477 | (source (origin
|
| 478 | (method git-fetch)
|
| 479 | (uri (git-reference
|
| 480 | (url
|
| 481 | "https://github.com/red-data-tools/unicode_plot.rb")
|
| 482 | (commit (string-append "v" version))))
|
| 483 | (file-name (git-file-name name version))
|
| 484 | (sha256
|
| 485 | (base32
|
| 486 | "0g67brnb7zp1xx9cp1x7bmyxwnvi2i8gplw7p1j7cppzin4kr1vj"))))
|
| 487 | (build-system ruby-build-system)
|
| 488 | (native-inputs (list bundler ruby-rake ruby-test-unit ruby-yard))
|
| 489 | (propagated-inputs (list ruby-enumerable-statistics))
|
| 490 | (synopsis "Library to plot your data by Unicode characters")
|
| 491 | (description "UnicodePlot provides the feature to make charts with Unicode
|
| 492 | characters. Supported charts are: barplot, boxplot, densityplot,
|
| 493 | histogram, lineplot, and scatterplot.")
|
| 494 | (home-page "https://github.com/red-data-tools/unicode_plot.rb")
|
| 495 | (license license:expat)))
|
| 496 |
|
| 497 | (define-public youplot
|
| 498 | (package
|
| 499 | (name "youplot")
|
| 500 | (version "0.4.6")
|
| 501 | |
| 502 | (source (origin
|
| 503 | (method git-fetch)
|
| 504 | (uri (git-reference
|
| 505 | (url "https://github.com/red-data-tools/YouPlot")
|
| 506 | (commit (string-append "v" version))))
|
| 507 | (file-name (git-file-name name version))
|
| 508 | (sha256
|
| 509 | (base32
|
| 510 | "1r9s8ls4f8w36fmja9vcl9wqdl9ikf8w7565srcn7i2wyza9bf7j"))))
|
| 511 | (build-system ruby-build-system)
|
| 512 | (native-inputs (list ruby-rake ruby-simplecov ruby-test-unit))
|
| 513 | (propagated-inputs (list ruby-unicode-plot))
|
| 514 | (synopsis "Command line tool that draw plots on the terminal")
|
| 515 | (description
|
| 516 | "YouPlot is a command line tool that draws plots on the terminal,
|
| 517 | powered by UnicodePlot gem. It provides commands @command{youplot}
|
| 518 | and @command{uplot} (shorthand) are provided, and supports chart types
|
| 519 | of barplot, histogram, lineplot, scatter, density, boxplot, and count.")
|
| 520 | (home-page "https://github.com/red-data-tools/YouPlot")
|
| 521 | (license license:expat)))
|
| 522 |
|
| 523 | |
| 524 | |
| 525 | |
| 526 | |