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