gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / rrdtool.scm
CommitLineData
13e7ce85
MW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
8a6c5b5d 3;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
13e7ce85
MW
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)
13e7ce85 21 #:use-module (gnu packages)
74a23552 22 #:use-module (gnu packages algebra)
13e7ce85 23 #:use-module (gnu packages base)
13e7ce85
MW
24 #:use-module (gnu packages fontutils)
25 #:use-module (gnu packages glib)
86f0d00c 26 #:use-module (gnu packages groff)
13e7ce85 27 #:use-module (gnu packages gtk)
74a23552 28 #:use-module (gnu packages perl)
86f0d00c
TGR
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))
13e7ce85
MW
36
37(define-public rrdtool
38 (package
39 (name "rrdtool")
8a6c5b5d 40 (version "1.7.2")
13e7ce85
MW
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
8a6c5b5d 47 "1nsqra0g2nja19akmf9x5y9hhgc35ml3w9dcdz2ayz7zgvmzm6d1"))))
13e7ce85 48 (build-system gnu-build-system)
74a23552
TGR
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
9d13e77a 64 ("tzdata" ,tzdata-for-tests)))
13e7ce85 65 (arguments
dc1d3cde
KK
66 '(#:phases
67 (modify-phases %standard-phases
68 (add-before 'configure 'pre-configure
69 (lambda _
70 (substitute* "libtool"
71 (("/bin/sed") (which "sed")))
74a23552
TGR
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))))))
570623d5 88 (home-page "https://oss.oetiker.ch/rrdtool/")
13e7ce85
MW
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
92time-series data (e.g. network bandwidth, machine-room temperature, server
93load average). It stores the data in Round Robin Databases (RRDs), a very
94compact way that will not expand over time. RRDtool processes the extracted
95data to enforce a certain data density, allowing for useful graphical
96representation of data values.")
97 (license license:gpl2+))) ; with license exception that allows combining
98 ; with many other licenses.