gnu: ocaml-linenoise: Update to 1.4.0.
[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)))
57 (native-inputs
58 (list groff
59 pkg-config
60 ;; For tests.
61 bc
62 perl ; will also build Perl bindings
63 tzdata-for-tests))
64 (arguments
65 `(#:disallowed-references (,tzdata-for-tests)
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 (search-input-directory inputs "share/zoneinfo"))))
77 (add-after 'install 'remove-native-input-references
78 (lambda* (#:key outputs #:allow-other-keys)
79 (let* ((out (assoc-ref outputs "out"))
80 (examples (string-append out "/share/rrdtool/examples")))
81 ;; Drop shebangs from examples to avoid depending on native-input
82 ;; perl. It's clear from context and extension how to run them.
83 (substitute* (find-files examples "\\.pl$")
84 (("^#!.*") ""))
85 #t))))))
86 (home-page "https://oss.oetiker.ch/rrdtool/")
87 (synopsis "Time-series data storage and display system")
88 (description
89 "The Round Robin Database Tool (RRDtool) is a system to store and display
90 time-series data (e.g. network bandwidth, machine-room temperature, server
91 load average). It stores the data in Round Robin Databases (RRDs), a very
92 compact way that will not expand over time. RRDtool processes the extracted
93 data to enforce a certain data density, allowing for useful graphical
94 representation of data values.")
95 (license license:gpl2+))) ; with license exception that allows combining
96 ; with many other licenses.