gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / rrdtool.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
3 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages rrdtool)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages algebra)
23 #:use-module (gnu packages base)
24 #:use-module (gnu packages fontutils)
25 #:use-module (gnu packages glib)
26 #:use-module (gnu packages groff)
27 #:use-module (gnu packages gtk)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages python)
31 #:use-module (gnu packages xml)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix download)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages))
36
37 (define-public rrdtool
38 (package
39 (name "rrdtool")
40 (version "1.7.2")
41 (source (origin
42 (method url-fetch)
43 (uri (string-append "http://oss.oetiker.ch/rrdtool/pub/rrdtool-"
44 version ".tar.gz"))
45 (sha256
46 (base32
47 "1nsqra0g2nja19akmf9x5y9hhgc35ml3w9dcdz2ayz7zgvmzm6d1"))))
48 (build-system gnu-build-system)
49 (inputs
50 `(("cairo" ,cairo)
51 ("freetype" ,freetype)
52 ("glib" ,glib)
53 ("gtk" ,gtk+-2)
54 ("libxml2" ,libxml2)
55 ("pango" ,pango)
56 ("python" ,python-2)))
57 (native-inputs
58 `(("groff" ,groff)
59 ("pkg-config" ,pkg-config)
60
61 ;; For tests.
62 ("bc" ,bc)
63 ("perl" ,perl) ; will also build Perl bindings
64 ("tzdata" ,tzdata-for-tests)))
65 (arguments
66 '(#:phases
67 (modify-phases %standard-phases
68 (add-before 'configure 'pre-configure
69 (lambda _
70 (substitute* "libtool"
71 (("/bin/sed") (which "sed")))
72 #t))
73 (add-before 'check 'prepare-test-environment
74 (lambda* (#:key inputs #:allow-other-keys)
75 (setenv "TZDIR"
76 (string-append (assoc-ref inputs "tzdata")
77 "/share/zoneinfo"))
78 #t))
79 (add-after 'install 'remove-native-input-references
80 (lambda* (#:key outputs #:allow-other-keys)
81 (let* ((out (assoc-ref outputs "out"))
82 (examples (string-append out "/share/rrdtool/examples")))
83 ;; Drop shebangs from examples to avoid depending on native-input
84 ;; perl. It's clear from context and extension how to run them.
85 (substitute* (find-files examples "\\.pl$")
86 (("^#!.*") ""))
87 #t))))))
88 (home-page "https://oss.oetiker.ch/rrdtool/")
89 (synopsis "Time-series data storage and display system")
90 (description
91 "The Round Robin Database Tool (RRDtool) is a system to store and display
92 time-series data (e.g. network bandwidth, machine-room temperature, server
93 load average). It stores the data in Round Robin Databases (RRDs), a very
94 compact way that will not expand over time. RRDtool processes the extracted
95 data to enforce a certain data density, allowing for useful graphical
96 representation of data values.")
97 (license license:gpl2+))) ; with license exception that allows combining
98 ; with many other licenses.