projects/guix·blob mpd-fix-groups · refs

526 lines · 22.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013-2021, 2025 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015 Eric Bavier <[email protected]>
4;;; Copyright © 2016-2025 Nicolas Goaziou <[email protected]>
5;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2020 Maxim Cournoyer <[email protected]>
7;;; Copyright © 2022 Antero Mejr <[email protected]>
8;;; Copyright © 2023 gemmaro <[email protected]>
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
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 ;; Remove bundled RapidJSON.
82 #~(begin
83 (delete-file-recursively "LspCpp/third_party/rapidjson")))))
84 (build-system gnu-build-system)
85 ;; Note: The 'asy' binary retains a reference to docdir for use with its
86 ;; "help" command in interactive mode, so adding a "doc" output is not
87 ;; currently useful.
88 (native-inputs
89 (list autoconf-2.71
90 automake
91 bison
92 boost
93 cmake-minimal
94 emacs-minimal
95 flex
96 ghostscript ;for tests
97 perl
98 pkg-config
99 rapidjson
100 texinfo ;for generating documentation
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 ;; Build process installs info file in the unusual
163 ;; "%out/share/info/asymptote/" location. Move it to
164 ;; "%out/share/info/" so it appears in the top-level directory.
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 ;; Default to a free pdf viewer.
173 (substitute* "settings.cc"
174 (("defaultPDFViewer=\"acroread\"")
175 "defaultPDFViewer=\"gv\""))))
176 (add-before 'build 'setenv
177 (lambda _
178 (setenv "TEXMFVAR" "/tmp"))) ;for font shapes generation
179 (add-before 'check 'set-HOME
180 ;; Some tests require write access to $HOME, otherwise leading to
181 ;; "failed to create directory /homeless-shelter/.asy" error.
182 (lambda _
183 (setenv "HOME" "/tmp")))
184 (add-after 'install 'install-Emacs-data
185 (lambda _
186 ;; Install related Emacs libraries into an appropriate location.
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 ;; Make sure 'xasy' runs with the correct PYTHONPATH.
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
203technical drawing, inspired by MetaPost but with an improved C++-like syntax.
204Asymptote provides for figures the same high-quality level of typesetting that
205LaTeX does for scientific text.")
206 ;; Most source files do not contain license statements, but the README
207 ;; contains: "All source files in the Asymptote project, unless explicitly
208 ;; noted otherwise, are released under version 3 (or later) of the GNU
209 ;; Lesser General Public License"
210 (license license:lgpl3+)))
211
212(define-public guile-charting
213 ;; This commit fixes a few things, including Guile 3 support, not available
214 ;; in the latest release.
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
238using 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 ;; First install libguile-plotutils.so.
271 (invoke "make" "install-guileextensionLTLIBRARIES")
272
273 ;; Then change source files to refer to it.
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
285plotting and graphing library. If you want to make graphs that look like you
286went 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 ;; Install binaries in the right place.
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 ; no tests
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 ;; Install "prefabs".
332 (for-each
333 (lambda (file)
334 (let ((target (string-append dir "/" (basename file))))
335 (copy-file file target)))
336 (find-files "../prefabs" "."))
337 ;; Allow them to be found.
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,
345charts, and graphics from data. Ploticus is good for automated or
346just-in-time graph generation, handles date and time data nicely, and has
347basic statistical capabilities. It allows significant user control over
348colors, 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 ;; Force the use of libXaw7 instead of libXaw. When not doing
365 ;; that, libplot.la ends up containing just "-lXaw" (without
366 ;; "-L/path/to/Xaw"), due to the fact that there is no
367 ;; libXaw.la, which forces us to propagate libXaw.
368 '(begin
369 (substitute* "configure"
370 (("-lXaw")
371 "-lXaw7"))
372 ;; Use the `png_jmpbuf' accessor, as recommended since libpng
373 ;; 1.4.0 (see:
374 ;; http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt).
375 (substitute* "libplot/z_write.c"
376 (("png_ptr->jmpbuf")
377 "png_jmpbuf (png_ptr)"))
378 #t))
379 (patches
380 ;; The test suite fails on some architectures such as i686 (see:
381 ;; https://lists.gnu.org/archive/html/bug-plotutils/2016-04/msg00002.html).
382 ;; The following Debian patch works around it.
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 ;; On i686 some tests fail due to excess floating point
390 ;; precision; work around it. However, libplotter is C++
391 ;; and thus unaffected by CFLAGS, but '-fexcess-precision'
392 ;; is not implemented for C++ as of GCC 10.
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 ;; This test reveals a slight difference in the SVG
403 ;; output due to floating point inequalities. Skip it.
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.
412It includes the C library @code{libplot} and the C++ @code{libplotter} library
413for exporting 2D vector graphics in many file formats. It also has support
414for 2D vector graphics animations. The package also contains command-line
415programs 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 ;; TODO: Review all available options and bindings to enable them or split
436 ;; in dedicated packages, see Debian's package for inspirations:
437 ;; <https://salsa.debian.org/science-team/plplot>.
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/") ;no HTTPS
447 (synopsis "Scientific plotting library with Unicode support")
448 (description
449 "PLplot is a software package for creating scientific plots which core
450library can be used to create standard x-y plots, semi-log plots, log-log
451plots, contour plots, 3D surface plots, mesh plots, bar charts and pie charts.
452Multiple graphs (of the same or different sizes) may be placed on a single
453page, and multiple pages are allowed for those device formats that support
454them.
455
456PLplot has support for plot symbols and text specified by the user in the
457UTF-8 encoding of Unicode. This means for our many Unicode-aware devices that
458plot symbols and text are only limited by the collection of glyphs normally
459available via installed system fonts. Furthermore, a large subset of our
460Unicode-aware devices also support complex text layout (CTL) languages such as
461Arabic, Hebrew, and Indic and Indic-derived CTL scripts such as Devanagari,
462Thai, Lao, and Tibetan. Thus, for these PLplot devices essentially any
463language that is supported by Unicode and installed system fonts can be used
464to label plots.")
465 (license (list license:lgpl2.0
466 license:gpl2+ ;octave bindings
467 license:bsd-2 ;docbook docs
468 license:ogl-psi1.0 ;files in data/ss
469 license:cc-by-sa3.0 ;examples/Chloe.pgm
470 license:expat)))) ;Cmake files
471
472(define-public ruby-unicode-plot
473 (package
474 (name "ruby-unicode-plot")
475 (version "0.0.5")
476 ;; Source at RubyGems.org doesn't have test fixtures.
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
492characters. Supported charts are: barplot, boxplot, densityplot,
493histogram, 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 ;; Source at RubyGems.org doesn't have tests.
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,
517powered by UnicodePlot gem. It provides commands @command{youplot}
518and @command{uplot} (shorthand) are provided, and supports chart types
519of 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;;; Avoid adding new packages to the end of this file. To reduce the chances
525;;; of a merge conflict, place them above in alphabetic order.
526;;;