1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
37 (define-public rrdtool
43 (uri (string-append "http://oss.oetiker.ch/rrdtool/pub/rrdtool-"
47 "0ssjqpa0dwwzbylc0drmlbq922qcw8crffc0rpr805xr6n4k8zgr"))))
48 (build-system gnu-build-system)
51 ("freetype" ,freetype)
56 ("python" ,python-2)))
59 ("pkg-config" ,pkg-config)
63 ("perl" ,perl) ; will also build Perl bindings
64 ("tzdata" ,tzdata-for-tests)))
67 (modify-phases %standard-phases
68 (add-before 'configure 'pre-configure
70 (substitute* "libtool"
71 (("/bin/sed") (which "sed")))
73 (add-before 'check 'prepare-test-environment
74 (lambda* (#:key inputs #:allow-other-keys)
76 (string-append (assoc-ref inputs "tzdata")
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$")
88 (home-page "https://oss.oetiker.ch/rrdtool/")
89 (synopsis "Time-series data storage and display system")
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.